Browse Source

lint: Move the linting code to a different module.

To try and move towards making programatic access to the linting code easier,
this commit separates out the linting script, from the linting functionality
that it uses.

* guix/scripts/lint.scm (emit-warnings): Alter to to not use match-lambda, as
<lint-warning> isn't accessible.
(<lint-warning>, lint-warning, make-lint-warning, lint-warning?,
lint-warning-message, lint-warning-message-text, lint-warning-message-data,
lint-warning-location, package-file, %make-warning make-warning,
<lint-checker>, lint-checker, make-lint-checker, lint-checker?,
lint-checker-name, lint-checker-description, lint-checker-check,
properly-starts-sentance?, starts-with-abbreviation?, %quoted-identifier-rx,
check-description-style, package-input-intersection,
check-inputs-should-be-native, check-inputs-should-not-be-an-input-at-all,
package-name-regexp, check-synopsis-style, probe-uri,
tls-certificate-error-string, validate-uri, check-home-page,
%distro-directory, check-patch-file-names, escape-quotes,
official-gnu-packages*, check-gnu-synopsis+description, origin-uris,
check-source, check-source-file-name, check-source-unstable-tarball,
check-mirror-url, check-github-url, check-derivation, check-license,
call-with-networking-fail-safe, with-networking-fail-safe,
current-vulnerabilities*, package-vulnerabilities, check-vulnerabilities,
check-for-updates, report-tabulations, report-trailing-white-space,
report-long-line, %hanging-paren-rx, report-lone-parantheses,
%formatting-reporters, report-formatting-issues, check-formatting, %checkers):
Move to…
* guix/lint.scm: … here
* po/guix/POTFILES.in: Add guix/lint.scm.
* Makefile.am: Add guix/lint.scm.
* tests/lint.scm: Change to import (guix lint), rather than (guix scripts lint).
gn-latest-20200428
Christopher Baines 2 years ago
parent
commit
f363c836e0
No known key found for this signature in database GPG Key ID: 5E28A33B0B84F577
5 changed files with 1244 additions and 1202 deletions
  1. +1
    -0
      Makefile.am
  2. +1222
    -0
      guix/lint.scm
  3. +19
    -1201
      guix/scripts/lint.scm
  4. +1
    -0
      po/guix/POTFILES.in
  5. +1
    -1
      tests/lint.scm

+ 1
- 0
Makefile.am View File

@ -98,6 +98,7 @@ MODULES = \
guix/self.scm \
guix/upstream.scm \
guix/licenses.scm \
guix/lint.scm \
guix/glob.scm \
guix/git.scm \
guix/graph.scm \


+ 1222
- 0
guix/lint.scm
File diff suppressed because it is too large
View File


+ 19
- 1201
guix/scripts/lint.scm
File diff suppressed because it is too large
View File


+ 1
- 0
po/guix/POTFILES.in View File

@ -40,6 +40,7 @@ gnu/machine/ssh.scm
guix/scripts.scm
guix/scripts/build.scm
guix/discovery.scm
guix/lint.scm
guix/scripts/download.scm
guix/scripts/package.scm
guix/scripts/install.scm


+ 1
- 1
tests/lint.scm View File

@ -33,7 +33,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (guix scripts lint)
#:use-module (guix lint)
#:use-module (guix ui)
#:use-module (gnu packages)
#:use-module (gnu packages glib)


Loading…
Cancel
Save