scripts: lint: Handle store connections for lint checkers.
authorChristopher Baines <mail@cbaines.net>
Sun, 15 Mar 2020 20:54:50 +0000 (20:54 +0000)
committerChristopher Baines <mail@cbaines.net>
Tue, 24 Mar 2020 19:47:46 +0000 (19:47 +0000)
commit57e12aad6dfc2d12567164144dd15161e66f32d5
tree2a8bd1f3ff0168350870c92ac12a00156f70cbba
parent7826fbc02b19727e4bd56dd3a4dc3046f2770b84
scripts: lint: Handle store connections for lint checkers.

Rather than individual checkers opening up a connection to the store for each
package to check, if any checker requires a store connection, open a
connection and pass it to all checkers that would use it. This makes running
the derivation checker much faster for multiple packages.

* guix/scripts/lint.scm (run-checkers): Add a #:store argument, and pass the
store to checkers if they require a store connection.
(guix-lint): Establish a store connection if any checker requires one, and
pass it through to run-checkers.
guix/scripts/lint.scm