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

Fix the documentation of opam lint --warnings #5818

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

kit-ty-kate
Copy link
Member

The documentation for opam lint --warnings=WARN currently states that when WARN starts with a + the default warnings are disables, however this is also the case with @ (added in #5652)

cc @Khady maybe that would have helped with your problem where it wasn't clear to you that @ is a replacement to + and not an addition (not -43+@21 but -43@21)

Or maybe should should have a description more like ocamlc's as it is basically the same thing:

  -w <list>  Enable or disable warnings according to <list>:
        +<spec>   enable warnings in <spec>
        -<spec>   disable warnings in <spec>
        @<spec>   enable warnings in <spec> and treat them as errors
     <spec> can be:
        <num>             a single warning number
        <num1>..<num2>    a range of consecutive warning numbers
        <letter>          a predefined set
     default setting is "+a-4-7-9-27-29-30-32..42-44-45-48-50-60-66..70"

@Khady
Copy link
Contributor

Khady commented Feb 1, 2024

looks good to me, thanks. Now that I re-read the explanation carefully it's obvious that @ is an "operator" like + or -. I wasn't careful enough. The description from ocamlc is maybe easier to understand for someone who just gives a very quick look to the doc but isn’t as complete?

@kit-ty-kate kit-ty-kate added this to the 2.2.0~beta2 milestone Feb 5, 2024
@kit-ty-kate kit-ty-kate merged commit 5fa0ac7 into ocaml:master Feb 5, 2024
29 checks passed
@kit-ty-kate kit-ty-kate deleted the fix-12 branch February 5, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants