guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#43261] [PATCH 2/2] lint: Add '--no-checkers' option.


From: Ludovic Courtès
Subject: [bug#43261] [PATCH 2/2] lint: Add '--no-checkers' option.
Date: Wed, 28 Oct 2020 16:18:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> * guix/scripts/lint.scm (%options, parse-options): Add '--no-checkers' option.
> * doc/guix.texi: Document it.

Please mention the section name (in the manual) and variable names.

> +(define (option-checker short-long)
> +    (option short-long #t #f

Indentation is off.  Also please add a docstring.

> +            (lambda (opt name arg result)
> +              (let ((names (map string->symbol (string-split arg #\,)))
> +                    (checker-names (map lint-checker-name %all-checkers)))
> +                (for-each (lambda (c)
> +                            (unless (memq c checker-names)
> +                              (leave (G_ "~a: invalid checker~%") c)))
> +                          names)
> +                (alist-cons (string->symbol (cadr short-long))

Use ‘match’ instead of ‘cadr’, or maybe make it a parameter of this
procedure?

Thanks!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]