~ruther/guix-local

ref: db6dcf816f55db26dac42e669d0851c8be468d2d guix-local/guix/scripts/lint.scm -rw-r--r-- 14.8 KiB
db6dcf81 — Ludovic Courtès 11 years ago
lint: Use localized checker descriptions.

* guix/scripts/lint.scm (list-checkers-and-exit): Wrap
  'lint-checker-description' call in (_ ...).
836f02bf — Ludovic Courtès 11 years ago
lint: Correctly internationalize warning messages.

* guix/scripts/lint.scm (emit-warning): Remove '_' call for format
  string.
  (check-description-style, check-inputs-should-be-native,
  check-synopsis-style, check-patches, check-gnu-synopsis+description):
  Wrap message in (_ ...).
f4d5bca3 — Ludovic Courtès 11 years ago
lint: Change checker names to be symbols.

* guix/scripts/lint.scm (%checkers): Change 'name' fields to be
  symbols.
  (%options): Adjust "-c" option handler accordingly.
37627ffa — Ludovic Courtès 11 years ago
lint: Fold 'sync-descriptions' script as 'gnu-description' lint checker.

* build-aux/sync-descriptions.scm: Remove.  Move payload to...
* guix/scripts/lint.scm: ... here.
  (escape-quotes, official-gnu-packages*,
  check-gnu-synopsis+description): New procedures.
  (%checkers): Add 'gnu-descriptions'.
* Makefile.am (EXTRA_DIST): Remove build-aux/sync-descriptions.scm.
  (sync-descriptions): Use 'guix lint'.
15a6d433 — Ludovic Courtès 11 years ago
lint: Allow synopses that start with an abbreviation.

* guix/scripts/lint.scm (starts-with-abbreviation?): New procedure.
  (check-synopsis-style)[check-start-with-package-name]: Use it.
* tests/lint.scm ("synopsis: start with abbreviation"): New test.
105c260f — Ludovic Courtès 11 years ago
lint: Skip starting-article test for the synopses of GNU packages.

* guix/scripts/lint.scm (check-synopsis-style)[check-start-article]:
  Change to (const #t) when PACKAGE matches 'gnu-package?'.
431e5f5a — Ludovic Courtès 11 years ago
lint: Tolerate sentences that start with a parenthesis or a quote.

* guix/scripts/lint.scm (properly-starts-sentence?): Add (, ", and ' as
  valid beginnings.
17854ef9 — Ludovic Courtès 11 years ago
lint: Improve check for synopses starting with package name.

* guix/scripts/lint.scm (package-name-regexp): New procedure.
  (check-synopsis-style)[check-start-with-package-name]: Use it instead
  of 'string-prefix-ci?'.
* tests/lint.scm ("synopsis: start with package name prefix"): New test.
3c42965b — Eric Bavier 11 years ago
guix: lint: Make exception for package name starting description.

* guix/scripts/lint.scm (check-description-style): Exception for
  upper-case rule if the description starts with the package name.
* tests/lint.scm: Test it.
903581f9 — Eric Bavier 11 years ago
guix: lint: Allow digits at start of synopsis or description.

* guix/scripts/lint.scm (start-with-capital-letter?): Rename too...
  (properly-starts-sentence?): Rewrite with regex and add digits.
  (check-description-style, check-synopsis-style): Use it.
* tests/lint.scm: Add tests.
334c43e3 — Eric Bavier 11 years ago
guix: lint: Check for empty synopses and descriptions.

* guix/scripts/lint.scm (check-description-style,
  check-synopsis-style): New emptiness checks.
* tests/lint.scm: Test them.
574e847b — Eric Bavier 11 years ago
guix: lint: Check for proper end-of-sentence space.

* guix/scripts/lint.scm (start-with-capital-letter?): Handle empty
  strings.
  (check-description-style): New check for end-of-sentence space.
* tests/lint.scm: Test it.
c04b82ff — Eric Bavier 11 years ago
guix: lint: Use if/when consistently.

* guix/scripts/lint.scm (check-synopsis-style): Replace single-branch
  uses of if with when.
  (check-patches): Same
86a41263 — Eric Bavier 11 years ago
guix: lint: Use string-suffix? and string-prefix? where appropriate.

* guix/scripts/lint.scm (check-synopsis): Use string-suffix? and
  string-prefix? in place of string-take and string=?.
dd7c013d — Cyril Roelandt 11 years ago
guix lint: add the --checkers option.

* guix/scripts/lint.scm: add the "--checkers" option.
* doc/guix.texi (Invoking guix lint): Document it.
* tests/guix-lint.sh: New file
* Makefile.am (SCM_TESTS): Add it.
3c762a13 — Cyril Roelandt 11 years ago
guix lint: make sure synopses do not start with the package name.

* guix/scripts/lint.scm (check-start-with-package-name): New method.
* tests/lint.scm ("synopsis: start with package name"): New test.
a00ffdaa — Cyril Roelandt 11 years ago
guix lint: Make sure a synopsis cannot start with a lower-case article.

* guix/scripts/lint.scm (check-start-article): use "string-ci=?" instead of
  "string=?".
* tests/lint.scm ("synopsis: starts with 'a'",
  "synopsis: starts with 'an'"): New tests.
8202a513 — Cyril Roelandt 11 years ago
guix lint: check whether descriptions and synopses start with an upper-case letter.

* guix/scripts/lint.scm (check-description-style,
  check-synopsis-start-upper-case): New methods.
* tests/lint.scm ("description: does not start with an upper-case letter",
  "synopsis: does not start with an upper-case letter"): New tests.
5622953d — Cyril Roelandt 11 years ago
guix lint: Make sure synopses are not too long.

* guix/scripts/lint.scm (check-synopsis-length): New procedure.
* tests/lint.scm ("synopsis: too long"): New test.
90d104ba — Cyril Roelandt 11 years ago
guix lint: make sure check-patches retrieves patch names.

* guix/lint (check-patches): Test the output of origin-patches.
Next