GNU bug report logs - #48320
[PATCH] lint: Verify if #:tests? is respected in the 'check' phase.

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Sun, 9 May 2021 18:03:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 48320 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 48320 <at> debbugs.gnu.org
Subject: Re: [PATCH v2] lint: Verify if #:tests? is respected in the 'check'
 phase.
Date: Tue, 29 Jun 2021 12:34:48 +0200
Hello Maxime,

Thanks for the new revision.

> +@deffn {Procedure} gexp->approximate-sexp @var{gexp}
> +Sometimes, it may be useful to convert a G-exp into a S-exp.
> +For example, some linters (@pxref{Invoking guix lint})

You can write longer sentences here, up to 78 columns.  If you are using
Emacs, fill-paragraph does the right thing.

> +  (define (sexp-uses-tests?? sexp)
> +    "Test if SEXP contains the symbol 'tests?'."
> +    (sexp-contains-atom? sexp 'tests?))
> +  (define (sexp-contains-atom? sexp atom)
> +    "Test if SEXP contains ATOM."
> +    (if (pair? sexp)
> +        (or (sexp-contains-atom? (car sexp) atom)
> +            (sexp-contains-atom? (cdr sexp) atom))
> +        (eq? sexp atom)))

It would make more sense to define "sexp-uses-tests??" later as it uses
"sexp-contains-atom" that is defined afterwards.

> +       (or (check-phases-delta head)
> +           (check-phases-deltas tail)))

I think it should be "append" instead of "or". Otherwise, it fails to
detect package which 'replace is not the first phase, see mkvtoolnix for
instance.

Otherwise looks fine :)

Thanks,

Mathieu




This bug report was last modified 3 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.