mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
lint: Add 'input-labels' checker.
* guix/lint.scm (check-input-labels): New procedure.
(%local-checkers): Add 'input-labels' checker.
* tests/lint.scm ("input labels: no warnings")
("input labels: one warning"): New tests.
* doc/guix.texi (Invoking guix lint): Mention it.
This commit is contained in:
@@ -356,6 +356,20 @@
|
||||
`(("python-setuptools" ,python-setuptools))))))
|
||||
(check-inputs-should-not-be-an-input-at-all pkg))))
|
||||
|
||||
(test-assert "input labels: no warnings"
|
||||
(let ((pkg (dummy-package "x"
|
||||
(inputs `(("glib" ,glib)
|
||||
("pkg-config" ,pkg-config))))))
|
||||
(null? (check-input-labels pkg))))
|
||||
|
||||
(test-equal "input labels: one warning"
|
||||
"label 'pkgkonfig' does not match package name 'pkg-config'"
|
||||
(single-lint-warning-message
|
||||
(let ((pkg (dummy-package "x"
|
||||
(inputs `(("glib" ,glib)
|
||||
("pkgkonfig" ,pkg-config))))))
|
||||
(check-input-labels pkg))))
|
||||
|
||||
(test-equal "file patches: different file name -> warning"
|
||||
"file names of patches should start with the package name"
|
||||
(single-lint-warning-message
|
||||
|
||||
Reference in New Issue
Block a user