yamllint
yamllint copied to clipboard
Feature request: exceptions for rules
Hello,
I currently have a lot of links in comments that fail the line-length test, which I would really like to keep at 80, but it would also be nice not have to add an yamllint disable...
comment to all these lines.
In tslint
there is an ignore-pattern
option for the line-length rule, that is an RegExp, which is used before checking the rule. In a yamllint config file this setting would look something like this:
rules:
line-length:
allow-non-breakable-inline-mappings: false
allow-non-breakable-words: true
ignore-pattern: "^# @see"
level: warning
max: 80
And then, this file would pass, even though it has a line with 91 characters
---
# Change the SQL data directory.
# @see https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_datadir
mariadb__datadir: '/var/data/mysql'
P.S. Thanks a lot for this tool.
It looks like a reasonable request :+1:
Contributions welcome!