mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00: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:
parent
8524349f78
commit
b7f1b4c1d0
3 changed files with 56 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue