From 0ad7364f0534bf09785bad91b9070fa455da7991 Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Thu, 13 Jan 2022 17:36:28 +0100 Subject: [PATCH 1/3] lint: W47, remove description and descr note --- src/state/opamFileTools.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/state/opamFileTools.ml b/src/state/opamFileTools.ml index 4fe8a17fc91..ac996097139 100644 --- a/src/state/opamFileTools.ml +++ b/src/state/opamFileTools.ml @@ -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])) From 79db5606ef3dd53b67775b0378ad9a5bb02e9e9a Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Thu, 16 Dec 2021 10:31:10 +0100 Subject: [PATCH 2/3] reftests: update lint test --- tests/reftests/lint.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/reftests/lint.test b/tests/reftests/lint.test index 2403ad7625a..be3f3dbf537 100644 --- a/tests/reftests/lint.test +++ b/tests/reftests/lint.test @@ -398,7 +398,7 @@ dev-repo: "hg+https://to@li.nt" 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 ### opam-version: "2.0" synopsis: "" From 581c5f369423a5647ffb199e05e424319baad954 Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Wed, 15 Dec 2021 20:14:19 +0100 Subject: [PATCH 3/3] update changes --- master_changes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/master_changes.md b/master_changes.md index 146090506c6..8ec1a619bb6 100644 --- a/master_changes.md +++ b/master_changes.md @@ -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]