summaryrefslogtreecommitdiff
path: root/guix/scripts/lint.scm
Commit message (Collapse)AuthorAge
...
* lint: Add 'formatting' checker.Ludovic Courtès2015-08-19
| | | | | | | | | | | * guix/scripts/lint.scm (report-tabulations, report-trailing-white-space, report-long-line, report-formatting-issues, check-formatting): New procedures. (%formatting-reporters): New variable. (%checkers): Add 'formatting' checker. * tests/lint.scm ("formatting: tabulation", "formatting: trailing white space", "formatting: long line", "formatting: alright"): New tests. * doc/guix.texi (Invoking guix lint): Mention the 'formatting' checker.
* Fix typos in translatable strings.Ludovic Courtès2015-07-23
| | | | | | | | | Reported by Anders Jonsson <anders.jonsson@norsjovallen.se>. * gnu/packages/backup.scm, gnu/packages/databases.scm, gnu/packages/linux.scm, gnu/packages/perl.scm, gnu/packages/web.scm, guix/scripts/lint.scm, guix/scripts/publish.scm: Fix typos in translatable strings.
* guix lint: Remove duplicated module lines.Alex Kost2015-07-13
| | | | | | * guix/scripts/lint.scm (guix): Remove duplicated lines for using 'srfi-34' and 'srfi-35' modules. These lines were introduced twice by commits b210b35 and 002c57c.
* guix: Clean up --help messages.Alex Kost2015-06-08
| | | | | | | | | | * guix/scripts/import.scm (show-help): Add newline before a list of importers. * guix/scripts/lint.scm (show-help): Split a long description line. * guix/scripts/package.scm (show-help): Improve docstrings for --install and --remove options. * guix/scripts/system.scm (show-help): Format actions the same way as guix commands and importers are formatted.
* lint: source: Warn only when all the URIs are unreachable.Ludovic Courtès2015-05-31
| | | | | | | * guix/scripts/lint.scm (call-with-accumulated-warnings): New procedure. (with-accumulated-warnings): New macro. (check-source): Add 'try-uris' and use it. Emit warnings only upon failure.
* lint: 'validate-uri' really returns #f on failure.Ludovic Courtès2015-05-31
| | | | * guix/scripts/lint.scm (validate-uri): Always return #f on failure.
* lint: Add a 'derivation' checker.Ludovic Courtès2015-04-13
| | | | | | * guix/scripts/lint.scm (check-derivation): New procedure. (%checkers): Add 'derivation' checker. * tests/lint.scm ("derivation: invalid arguments"): New test.
* lint: Report patches that cannot be found.Ludovic Courtès2015-04-10
| | | | | * guix/scripts/lint.scm (check-patch-file-names): Wrap body in 'guard'. * tests/lint.scm ("patches: not found"): New test.
* lint: Rename 'check-patches' to 'check-patch-file-names'.Ludovic Courtès2015-04-10
| | | | | | | * guix/scripts/lint.scm (check-patches): Rename to... (check-patch-file-names): ... this. Rename 'filename' to 'file'. (%checkers): Adjust accordingly. * tests/lint.scm ("patches: file names"): Likewise.
* lint: Report details about FTP errors.Ludovic Courtès2015-03-19
| | | | | | | * guix/scripts/lint.scm (probe-uri) <'ftp>: Pass more information about failures alongside 'ftp-response. (validate-uri) <ftp-response>: Handle it, and adjust "not reachable" message accordingly.
* lint: Change misleading variable name.Ludovic Courtès2015-03-19
| | | | * guix/scripts/lint.scm (probe-uri) <'ftp>: Rename 'port' to 'conn'.
* lint: Add tests for the 'source' checker.Ludovic Courtès2015-03-05
| | | | | | * guix/scripts/lint.scm (check-source): Export. * tests/lint.scm (%null-sha256): New procedure. ("source: 200", "source: 404"): New tests.
* lint: handle FTP URIs.Cyril Roelandt2015-02-10
| | | | * guix/scripts/lint.scm (probe-uri): handle FTP URIs.
* lint: Fix argument parsing when several packages are specified.Ludovic Courtès2015-01-28
| | | | | | | | * guix/scripts/lint.scm (%options) <--checkers>: Remove 'arg-handler' parameter, and return a single value. (guix-lint)[parse-options]: Remove 'arg-handler' parameter from handlers. Remove second seed to 'args-fold*'. * tests/guix-lint.sh: Add test.
* guix lint: Make the 'source' checker happy if at least one URI is valid.Ludovic Courtès2015-01-26
| | | | | | | | Before that it would check all the URIs of each package. * guix/scripts/lint.scm (validate-uri): Really return #f on failure and #t otherwise. (check-source): Replace 'for-each' with 'any'.
* lint: add 'source' checker.Cyril Roelandt2015-01-25
| | | | | * guix/scripts/lint.scm (validate-uri?): New procedure. (%checkers): Add 'source' checker
* lint: Add tests for the 'home-page' checker.Ludovic Courtès2014-12-29
| | | | | | | | | | | | | Suggested by Cyril Roelandt <tipecaml@gmail.com>. * tests/lint.scm (%http-server-port, %http-server-socket, %local-url, stub-http-server): New variables. (http-write, call-with-http-server): New procedures. (with-http-server): New macro. ("home-page: wrong home-page", "home-page: invalid URI", "home-page: host not found", "home-page: Connection refused", "home-page: 200", "home-page: 404"): New tests. * guix/scripts/lint.scm (check-home-page): Export.
* lint: Report on the package being checked.Ludovic Courtès2014-12-28
| | | | | | * guix/scripts/lint.scm (run-checkers): Check whether (current-error-port) is a tty, and print the package being checked and the checker currently running when it is.
* lint: Add 'home-page' checker.Ludovic Courtès2014-12-28
| | | | | | * guix/build/download.scm (open-connection-for-uri): Export. * guix/scripts/lint.scm (probe-uri, check-home-page): New procedures. (%checkers): Add 'home-page' checker.
* lint: Fix typos in checker descriptions.Ludovic Courtès2014-11-19
| | | | | * guix/scripts/lint.scm (%checkers): "file names" (two words), and "synopses" (plural).
* lint: Use localized checker descriptions.Ludovic Courtès2014-11-19
| | | | | * guix/scripts/lint.scm (list-checkers-and-exit): Wrap 'lint-checker-description' call in (_ ...).
* lint: Correctly internationalize warning messages.Ludovic Courtès2014-11-19
| | | | | | | | * 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 (_ ...).
* lint: Change checker names to be symbols.Ludovic Courtès2014-11-19
| | | | | | * guix/scripts/lint.scm (%checkers): Change 'name' fields to be symbols. (%options): Adjust "-c" option handler accordingly.
* lint: Fold 'sync-descriptions' script as 'gnu-description' lint checker.Ludovic Courtès2014-11-19
| | | | | | | | | | * 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'.
* lint: Allow synopses that start with an abbreviation.Ludovic Courtès2014-11-07
| | | | | | * 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.
* lint: Skip starting-article test for the synopses of GNU packages.Ludovic Courtès2014-11-07
| | | | | * guix/scripts/lint.scm (check-synopsis-style)[check-start-article]: Change to (const #t) when PACKAGE matches 'gnu-package?'.
* lint: Tolerate sentences that start with a parenthesis or a quote.Ludovic Courtès2014-11-07
| | | | | * guix/scripts/lint.scm (properly-starts-sentence?): Add (, ", and ' as valid beginnings.
* lint: Improve check for synopses starting with package name.Ludovic Courtès2014-11-07
| | | | | | | * 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.
* guix: lint: Make exception for package name starting description.Eric Bavier2014-10-26
| | | | | | * 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.
* guix: lint: Allow digits at start of synopsis or description.Eric Bavier2014-10-26
| | | | | | | * 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.
* guix: lint: Check for empty synopses and descriptions.Eric Bavier2014-10-26
| | | | | | * guix/scripts/lint.scm (check-description-style, check-synopsis-style): New emptiness checks. * tests/lint.scm: Test them.
* guix: lint: Check for proper end-of-sentence space.Eric Bavier2014-10-26
| | | | | | | * 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.
* guix: lint: Use if/when consistently.Eric Bavier2014-10-26
| | | | | | * guix/scripts/lint.scm (check-synopsis-style): Replace single-branch uses of if with when. (check-patches): Same
* guix: lint: Use string-suffix? and string-prefix? where appropriate.Eric Bavier2014-10-26
| | | | | * guix/scripts/lint.scm (check-synopsis): Use string-suffix? and string-prefix? in place of string-take and string=?.
* guix lint: add the --checkers option.Cyril Roelandt2014-10-16
| | | | | | | * 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.
* guix lint: make sure synopses do not start with the package name.Cyril Roelandt2014-10-08
| | | | | * guix/scripts/lint.scm (check-start-with-package-name): New method. * tests/lint.scm ("synopsis: start with package name"): New test.
* guix lint: Make sure a synopsis cannot start with a lower-case article.Cyril Roelandt2014-10-08
| | | | | | | * 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.
* guix lint: check whether descriptions and synopses start with an upper-case ↵Cyril Roelandt2014-10-08
| | | | | | | | | 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.
* guix lint: Make sure synopses are not too long.Cyril Roelandt2014-10-08
| | | | | * guix/scripts/lint.scm (check-synopsis-length): New procedure. * tests/lint.scm ("synopsis: too long"): New test.
* guix lint: make sure check-patches retrieves patch names.Cyril Roelandt2014-10-08
| | | | * guix/lint (check-patches): Test the output of origin-patches.
* guix lint: Remove "guix lint: " prefix from warnings.Ludovic Courtès2014-09-03
| | | | | | | | This allows editors to parse warnings correctly. * guix/scripts/lint.scm (emit-warning): Use 'format' instead of 'warning', to avoid the "guix lint: " prefix in messages. * tests/lint.scm (call-with-warnings): Indent.
* scripts: add guix lintCyril Roelandt2014-09-03
* guix/scripts/lint.scm: New file. Defines a 'lint' tool for Guix packages. * tests/lint.scm: New file. * Makefile.am (MODULES, SCM_TESTS): Add them. * po/guix/Makevars: Update appropriately. * po/guix/POTFILES.in: Update appropriately. * doc/guix.texi: Document "guix lint".