Skip to content

Commit

Permalink
Merge pull request #5069 from rjbou/lint-W47
Browse files Browse the repository at this point in the history
lint W47: clarify empty description message
  • Loading branch information
kit-ty-kate authored Feb 14, 2023
2 parents a29280f + 581c5f3 commit 24e5326
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ users)
* [NEW] Add `--no-switch` option [#4850 @rjbou - fix #4858]

## Lint
* W47: remove the mention of the opam 1.2 descr file in the warning message [#5069 @rjbou - fix #4989]
* W68: add warning for missing license field [#4766 @kit-ty-kate - partial fix #4598]
* W62: use the spdx_licenses library to check for valid licenses. This allows to use compound expressions such as "MIT AND (GPL-2.0-only OR LGPL-2.0-only)", as well as user defined licenses e.g. "LicenseRef-my-custom-license" [#4768 @kit-ty-kate - fixes #4598]
* E57 (capital on synopsis) not trigger W47 (empty descr) [#5070 @rjbou]
Expand Down
3 changes: 1 addition & 2 deletions src/state/opamFileTools.ml
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,7 @@ let t_lint ?check_extra_files ?(check_upstream=false) ?(all=false) t =
(t.install <> [] || t.remove <> [] || t.url <> None ||
t.extra_sources <> []));
cond 47 `Warning
"Synopsis (or description first line) should start with a capital and \
not end with a dot"
"Synopsis should start with a capital and not end with a dot"
(let valid_re =
Re.(compile (seq [bos; diff any (alt [blank; lower]); rep any;
diff any (alt [blank; char '.']); eos]))
Expand Down
2 changes: 1 addition & 1 deletion tests/reftests/lint.test
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ dev-repo: "hg+https://[email protected]"
bug-reports: "https://nobug"
### opam lint ./lint.opam
${BASEDIR}/lint.opam: Warnings.
warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
warning 47: Synopsis should start with a capital and not end with a dot
### <lint.opam>
opam-version: "2.0"
synopsis: ""
Expand Down

0 comments on commit 24e5326

Please sign in to comment.