-
Notifications
You must be signed in to change notification settings - Fork 358
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
Conversation
src/state/opamFileTools.ml
Outdated
@@ -524,8 +524,8 @@ 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 (or 'descr' section first line) should start with a capital \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Synopsis (or 'descr' section first line) should start with a capital \ | |
"Synopsis should start with a capital \ |
Should we maybe entierly omit this, given this is opam 1.2 stuff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make the warning message clearer and more to the point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does all packages have a synopsis ? Lint 57 just checks if synopsis and descr are not both empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I was under the impression that synopsis
was "mandatory" (would raise a warning if missing), but now that #5070 has been merged it’s not the case anymore.
I think it should be mandatory given currently if it is not present, opam list
will not show the "first line of the description field" as this W47 might indicate:
opam list hll.3.16
# Packages matching: name-match(hll) & version-match(3.16) & (installed | available)
# Package # Installed # Synopsis
hll.3.16 --
(hll.3.16
currently does not have synopsis
but a one line description)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#5070 doesn't change the lint behaviour, it only fixes double linting trigger (empty synopsis | description that trigger no capital one).
Cited list behaviour for me is a list issue as we didn't defined that synopsis is mandatory & non empty (which is the case of hll)
from dev meeting: We need to check synopsis & description usage. synopsis must not be empty, and description is optional. it's descr that is optional -> add a deprectaed message when encountered (in order to remove it) |
proposal: in this PR, we remove the descr reference, and in another, we deprecate and clean-up |
ebb0220
to
20fd96f
Compare
This just needs:
|
20fd96f
to
581c5f3
Compare
Thanks! |
The followup PR to restore the missing lint is at #5442 |
Specify that descr section is empty instead of descriptionremove descr note in order to deprecate itfix #4989