guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] scripts: add guix lint


From: Ludovic Courtès
Subject: Re: [PATCH 1/2] scripts: add guix lint
Date: Tue, 22 Jul 2014 15:38:11 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Two things I forgot to ask for (you’ll hate me for that ;-)):

  1. Could you write tests for the checkers, as tests/lint.scm?

     The tests would make sure that for a ‘package’ structure that
     exposes the problem being checked for, the checker does emit a
     warning on ‘guix-warning-port’, like:

     (define (call-with-warnings thunk)
       (let ((port (open-output-string)))
         (parameterize ((guix-warning-port port))
           (thunk))
         (get-output-string port)))

     (test-assert "synopsis warning emitted"
       (->bool
        (string-contains (call-with-warnings
                           (lambda ()
                             (check-foo-bar pkg)))
                         "synopsis has a problem")))

   2. Add an “Invoking guix lint” node in guix.texi, with links to there
      from “Defining Packages”.

TIA.  :-)

Ludo’.



reply via email to

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