* tests/lint.scm (%http-server-lock, %http-server-ready): New
variables.
(http-open): New procedure.
(stub-http-server): Use it.
(call-with-http-server): Wrap body in 'with-mutex'. Call
'wait-condition-variable' after 'make-thread'.
* 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.
* 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.
* tests/lint.scm ("description: may start with a digit"): Replace
(not (string-contains exp str)) with (string-null? exp).
("description: may start with lower-case package name"): Likewise.
("description: end-of-sentence detection with abbreviations"):
Likewise.
("synopsis: may start with a digit"): Likewise.
("synopsis: ends with 'etc.'"): Likewise.
* 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/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/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/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/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.
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.