lint: Separate checkers by dependence on the internet.
authorChristopher Baines <mail@cbaines.net>
Tue, 2 Jul 2019 19:25:42 +0000 (20:25 +0100)
committerChristopher Baines <mail@cbaines.net>
Mon, 15 Jul 2019 21:32:19 +0000 (22:32 +0100)
commit38f3176a57593be45e245de5fec27518886ce5eb
tree914db317f1683a2096cfab6ef0d5efd27bbf2370
parentf363c836e0b4c416dae594af4257459da592b35c
lint: Separate checkers by dependence on the internet.

I think there are a couple of potential uses for this. It's somewhat a
separation in to what checkers are just checking the contents of the
repository (line length for example), and other checkers which are bringing in
external information which could change.

I'm thinking particularly, about treating network dependent checkers
differently when automatically running them, but this commit also adds a
--no-network flag to guix lint, which selects the checkers that don't access
the network, which could be useful if no network access is available.

* guix/lint.scm (%checkers): Rename to %all-checkers.
(%local-checkers, %network-dependent-checkers): New variables.
* guix/scripts/lint.scm (run-checkers): Make the checkers argument mandatory.
(list-checkers-and-exit): Handle the checkers as an argument.
(%options): Adjust for changes to %checkers, add a --no-network option, and
change how the --list-checkers option is handled.
(guix-lint): Adjust indentation, and update how the checkers are handled.
guix/lint.scm
guix/scripts/lint.scm