Comments (3)
As another alternative: you can override a rule that defaults as a warning to be an error
extends: default
rules:
comments:
level: error
I do like the idea of adding top level configuration key like strict: true
.
from yamllint.
Hello,
I allowed myself to rename the issue title, because most command-line flags (-h
, -c
, -d
, -v
, --list-files
...) aren't meant for that.
Related to #348.
I'm still not a fan of allowing strict: true
or no-warnings: true
in configuration, because in my opinion these are flags for temporarily altering the output (using command line), while static customizations should define level: error|warning
permanently in the configuration file. But I note you and @andrewimeson like the idea! I'm curious to know how many people would use this feature.
from yamllint.
I'm happy with the Issue title change to focus on the strict flag. What I would like to to is permanently set the exit code behaviour of yamllint. My context is for use with pre-commit, but it would also apply to other contexts where the exit code is tested.
Setting level: error
for the four rules in the default
configuration which have level: warning
set is an indirect way of influencing the exit code behaviour and has some undesirable features from my point-of-view:
- I agree with the idea of
level:
, that some rule violations are more severe than others, and making everything anerror
for the purpose of influencing the exit code will remove that distinction. - When a new rule with
level: warning
is added to thedefault
configuration any violations won't be detected by automated processes if--strict
is not used. - If/when I happen to notice a new rule with
level: warning
has been introduced then I'll have to manually update every.yamllint
file which will be error-prone toil.
Setting level: error
is certainly feasible, but due to the three points above I would still find myself motivated to permanently set the --strict
flag.
Adrien, there's only one rigorous way to satisfy your curiosity: implement a config file setting for strict and then survey public repos to see how many people use it 😄
from yamllint.
Related Issues (20)
- azure pipeline expression ${{ else }} false positive key-duplicates HOT 2
- `test_run_with_user_global_config_file` fails if `XDG_CONFIG_HOME` is set HOT 2
- flake8 → ruff? HOT 9
- New-line problem on Windows HOT 2
- Enable ruff format? HOT 7
- problemfixer.py", line 256, in fix_wrong_indentation HOT 2
- Feature Request: Support for Configuration in `pyproject.toml` HOT 2
- Optional extended detection in key-duplicates HOT 3
- Create GitHub releases with changelogs HOT 6
- EditorConfig support HOT 1
- Weird lint error on github action yaml HOT 1
- 1.35.0 broke the "ignore" feature HOT 8
- Is there a quick way of enabling all rules?
- Check values for empty strings if quotas
- Expected <document start> but found <scalar> syntax error wrt comment line between scalars HOT 1
- Snap release HOT 2
- "string value is redundantly quoted with single quotes" when string contains line break and backslash HOT 8
- yamllint should provide meaningful output if no results found HOT 6
- "string value is redundantly quoted with single quotes" when string is a timestamp HOT 1
- False positive with github actions yaml HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yamllint.