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

Support no warnings in config #348

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kadaan
Copy link

@kadaan kadaan commented Dec 21, 2020

Add support for including no-warnings: true or no-warnings: false in the config file. If either the config file no-warnings: true or the cli option -no-warnings are set, then no-warnings mode will be enabled.

@coveralls
Copy link

coveralls commented Dec 21, 2020

Coverage Status

Coverage increased (+0.01%) to 97.586% when pulling 5de2fff on kadaan:Support_no_warnings_in_config into a3fc64d on adrienverge:master.

@kadaan
Copy link
Author

kadaan commented Dec 21, 2020

@adrienverge What do you think?

@adrienverge
Copy link
Owner

Hello,

I'm not sure what to think because I dont' know what "the no-warnings mode" is. Your commit doesn't say it, neither does it add documentation to explain this option.

If it's somehow comparable to --strict (but with a different effect), the two options should appear consistent to the user. And I'm not favorable to adding another key-value option inside configuration files, if their effect can already be achieved within those files (by changing rules level).

@kadaan
Copy link
Author

kadaan commented Dec 22, 2020

—no-warnings is already a command line option that yamllint accepts. This simply allows it to be specified in the configuration file, rather than only on the command line.

The documentation currently states:

If the script is invoked with the --no-warnings option, it won’t output warning level problems, only error level ones.

@adrienverge
Copy link
Owner

—no-warnings is already a command line option that yamllint accepts.

Ah yes, sorry I forgot that.

I'm not favorable to adding redundant options inside configuration. Conf already allows removing rules if their output is not wanted. Command-line arguments --strict and --no-warnings are only runtime switches to temporarily alter yamllint output.

@kadaan
Copy link
Author

kadaan commented Dec 30, 2020

Hmmmm. That is unfortunate. We are trying to use this as part of our build and need no warnings enabled. If that was all, we wouldn’t need this feature. But, we are also trying to have Atom perform the same linting. Because this cannot be controlled via the config file, it is not possible to get the same behavior in both scenarios without manual configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants