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

opam lint: Allow to mark a set of warnings as errors #5652

Merged
merged 5 commits into from
Sep 12, 2023

Conversation

kit-ty-kate
Copy link
Member

Fixes #5651

This PR allows to mark a set of warnings as error and make the command fail.

Examples:

  • opam lint -W@0..999 enables all warnings and errors and fail if any is detected.
  • opam lint -W@62 enables W62 and fail if this warning is detected but ignore any other warnings or errors

The syntax is inspired from the ocamlc -w option.

@rjbou
Copy link
Collaborator

rjbou commented Sep 8, 2023

I've added a test for --warn option (to complete ?) and a commit that adds the change in display (warning -> error).

src/client/opamCommands.ml Outdated Show resolved Hide resolved
Co-authored-by: R. Boujbel <rjbou@ocamlpro.com>
@kit-ty-kate kit-ty-kate added this to the 2.2.0~alpha3 milestone Sep 12, 2023
@kit-ty-kate kit-ty-kate merged commit f0913fc into ocaml:master Sep 12, 2023
27 checks passed
@kit-ty-kate kit-ty-kate deleted the lint-warn-error branch September 12, 2023 11:43
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.

opam lint: a command line flag to make opam lint return 1 on warnings
2 participants