diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2021-12-19 15:15:11 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2021-12-19 15:15:11 +0200 |
commit | 6ccf8ea81f95963c0b7f945648106576008ee105 (patch) | |
tree | f39f596e6c3e98ff1e9f1de0ad41c977e9dd37c1 /guix/lint.scm | |
parent | fcaed5b81e893f34d77527fbef389ca628ca882d (diff) | |
parent | 9f916d14765b00309c742fcbff0cfabdd10dcf05 (diff) | |
download | guix-patches-6ccf8ea81f95963c0b7f945648106576008ee105.tar guix-patches-6ccf8ea81f95963c0b7f945648106576008ee105.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/lint.scm')
-rw-r--r-- | guix/lint.scm | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/guix/lint.scm b/guix/lint.scm index 2a703f9b6d..74b9a304d9 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -322,6 +322,21 @@ markup is valid return a plain-text version of DESCRIPTION, otherwise #f." (G_ "Texinfo markup in description is invalid") #:field 'description)))) + (define (check-description-typo description typo-corrections) + "Check that DESCRIPTION does not contain typo, with optional correction" + (append-map + (match-lambda + ((typo . correction) + (if (string-contains description typo) + (list + (make-warning package + (G_ + (format #false + "description contains typo '~a'~@[, should be '~a'~]" + typo correction)))) + '()))) + typo-corrections)) + (define (check-trademarks description) "Check that DESCRIPTION does not contain '™' or '®' characters. See http://www.gnu.org/prep/standards/html_node/Trademarks.html." @@ -402,6 +417,10 @@ by two spaces; possible infraction~p at ~{~a~^, ~}") (check-not-empty description) (check-quotes description) (check-trademarks description) + (check-description-typo description '(("This packages" . "This package") + ("This modules" . "This module") + ("allows to" . #f) + ("permits to" . #f))) ;; Use raw description for this because Texinfo rendering ;; automatically fixes end of sentence space. (check-end-of-sentence-space description) @@ -459,6 +478,7 @@ of a package, and INPUT-NAMES, a list of package specifications such as "help2man" "intltool" "itstool" + "kdoctools" "libtool" "m4" "qttools" @@ -967,8 +987,12 @@ patch could not be found." ;; Check whether we're reaching tar's maximum file name length. (let ((prefix (string-length (%distro-directory))) - (margin (string-length "guix-2.0.0rc3-10000-1234567890/")) - (max 99)) + ;; Margin approximating the largest path that "make dist" might + ;; create, with a release candidate version, 123456 commits, and + ;; git commit hash abcde0. + (margin (string-length "guix-92.0.0rc3-123456-abcde0/")) + ;; Tested maximum patch file length for ustar format. + (max 151)) (filter-map (match-lambda ((? string? patch) (if (> (+ margin (if (string-prefix? (%distro-directory) @@ -978,7 +1002,7 @@ patch could not be found." max) (make-warning package - (G_ "~a: file name is too long") + (G_ "~a: file name is too long, which may break 'make dist'") (list (basename patch)) #:field 'patch-file-names) #f)) @@ -1585,7 +1609,7 @@ Heritage and missing from the Disarchive database") (#f '()) (id (list (make-warning package - (G_ " + (G_ "\ Disarchive entry refers to non-existent SWH directory '~a'") (list id) #:field 'source))))))) |