diff options
author | Marius Bakke <marius@gnu.org> | 2021-05-09 21:29:46 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2021-05-09 21:29:46 +0200 |
commit | f03426420497cd9839f5fb3cb547dbecd8d6053b (patch) | |
tree | 220cdbab5b58b27c63d2df3ee711ad4bfdda074b /guix/lint.scm | |
parent | 3cf1afb7e7249992b2db2f4f00899fd22237e89a (diff) | |
parent | 069399ee9dbf75b7c89583f03346a63b2cfe4ac6 (diff) |
Merge branch 'master' into core-updates
Conflicts:
gnu/local.mk
gnu/packages/bioinformatics.scm
gnu/packages/django.scm
gnu/packages/gtk.scm
gnu/packages/llvm.scm
gnu/packages/python-web.scm
gnu/packages/python.scm
gnu/packages/tex.scm
guix/build-system/asdf.scm
guix/build/emacs-build-system.scm
guix/profiles.scm
Diffstat (limited to 'guix/lint.scm')
-rw-r--r-- | guix/lint.scm | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/guix/lint.scm b/guix/lint.scm index a7d6bbba4f..1bebfe03d3 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com> +;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,6 +82,7 @@ check-synopsis-style check-derivation check-home-page + check-name check-source check-source-file-name check-source-unstable-tarball @@ -173,14 +175,20 @@ (define (check-name package) "Check whether PACKAGE's name matches our guidelines." (let ((name (package-name package))) - ;; Currently checks only whether the name is too short. - (if (and (<= (string-length name) 1) - (not (string=? name "r"))) ; common-sense exception - (list - (make-warning package - (G_ "name should be longer than a single character") - #:field 'name)) - '()))) + (cond + ;; Currently checks only whether the name is too short. + ((and (<= (string-length name) 1) + (not (string=? name "r"))) ; common-sense exception + (list + (make-warning package + (G_ "name should be longer than a single character") + #:field 'name))) + ((string-index name #\_) + (list + (make-warning package + (G_ "name should use hyphens instead of underscores") + #:field 'name))) + (else '())))) (define (properly-starts-sentence? s) (string-match "^[(\"'`[:upper:][:digit:]]" s)) |