-
Notifications
You must be signed in to change notification settings - Fork 640
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
Neuter min space requirement for inline comments #1821
Conversation
Update our yamllint config defaults to disable the requirement of adding two spaces before each inline comments. This does not affect users that already set a different value in their yamllint config files. This will improve the compatibility with various code formatters, as mentioned in ansible#1820
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, wholeheatedly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change mean that previously "green" YAML files will now become "red"? If yes, then I am -1 on this change during the 5.x.y series of releases. Breaking people's CI/CD setups is not something we should do lightly.
And I know introducing new rules can also "break" the CI/CD, but those situations are different since in most cases they indicate that something can be improved. Changing comment formatting brings no direct benefit to linter users.
I did not see any breakage reported by eco job but I do realise that someone could be surprised by the new setup. Maybe we can do this in two steps, first disabling that check and delaying the new preference for a major version change. |
Update our yamllint config defaults to disable the requirement of adding two spaces before each inline comments. This does not affect users that already set a different value in their yamllint config files.
This change will not produce extra errors after is applied, it will only reduce the number of errors reported in general as
foo: bar # that is cool!
will no longer complain about missing an additional space, using one or two will be fine.The expected behavior is that ansible-lint will no longer report problems like:
This will improve the compatibility with various code formatters, as mentioned in #1820