Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint W47: clarify empty description message #5069

Merged
merged 3 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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