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

From: Ludovic Courtès <[email-masked]>
Date: Wed, 28 Oct 2020 16:18:13 +0100

Hi,

zimoun <[email-masked]> 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’.