* guix/lint.scm (report-tabulations, report-trailing-white-space)
(report-long-line, report-lone-parentheses): Return #f instead
of *unspecified* when there are no warnings.
(report-formatting-issues): Use 'filter-map' instead of 'map' + 'filter'.
Fixes <https://bugs.gnu.org/37160>.
Reported by Jonathan Brielmaier <jonathan.brielmaier@web.de>.
* guix/lint.scm (check-for-updates): Make sure the first argument to
'with-networking-fail-safe' is the whole error message.
This restores the behavior of 'guix lint' prior to commit
50fc2384fe.
* guix/lint.scm (check-source)[warnings-for-uris]: Rewrite to stop as
soon as one of URIS is valid.
Fixes a regression introduced in
50fc2384fe.
Previously, 'guix lint -c source coreutils' would complain if one of the
mirrors was unavailable. This is no longer the case.
* guix/lint.scm (check-source)[warnings-for-uris]: Use 'filter-map'.
Remove 'append-map' call.
Use 'append-map' here so that we can meaningfull compare the length or
URIS and that of WARNINGS.
Use '=' to compare lengths.
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.