-
Notifications
You must be signed in to change notification settings - Fork 260
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
Is it possible to dis/enable checks using comments? #8
Comments
Hi @tykeal, disabling checks using comments is a great idea. This is a feature I wanted to implement but unfortunately, I don't have time for this anymore. Contributions are welcome! |
Hi @tykeal, I implemented the feature to dis/enable checks using comments. You can use it like this: # yamllint disable-line rule:line-length
my very long line which is longer than 80 chars or like this: # yamllint disable-line
my very long line which is longer than 80 chars or like this: my very long line which is longer than 80 chars # yamllint disable-line or like this: # yamllint disable rule:line-length
my very long line which is longer than 80 chars
# yamllint enable Could you try it and tell me if it works as you expect it? git clone https://github.com/adrienverge/yamllint.git
cd yamllint
python setup.py sdist
pip install --upgrade --user dist/yamllint-1.2.2.tar.gz Thanks! |
@adrienverge that looks exactly like what I was hoping for! Thanks! I'll give it a try sometime today provided I can find the time :) |
I work with a lot of yaml files that can have extremely long lines that can't be broken but aren't passing the default profile. I want to fail on any line that is > 80 char unless explicitly ignored. Is this possible?
For instance with puppet syntax checking I would do something like:
I don't see anything in the docs to indicate if something like this is possible
The text was updated successfully, but these errors were encountered: