Provide reason with rules #936
Replies: 4 comments
-
This. Linting allows you to discover things you do wrong, if there is no reasoning, you can't learn why it's wrong, you can't make a decision, it becomes cargo-culting. |
Beta Was this translation helpful? Give feedback.
-
It would be very useful. For example I got "Package installs should not use latest" on role that have as whole point to upgrade I am not sure what is supposed to be wrong with them. If the reason is "it can cause instability in the setup" then I would happily ignore it - as in this case whole point is to introduce instability (AKA upgrade them as needed). But if |
Beta Was this translation helpful? Give feedback.
-
This looks like a good idea, a pull-requests would be welcomed. |
Beta Was this translation helpful? Give feedback.
-
Maybe this overloads the output of |
Beta Was this translation helpful? Give feedback.
-
Summary
Provide a reason along the side with the explanation how to solve the linting error in order to allow users to make informed decisions about the linting error.
Issue Type
Additional Information
Currently the default rules simply state what is wrong and how to fix it. What they don't tell is why it's wrong or simply worth checking. For example:
403: Package installs should not use latest
simply states thatPackage installs should use state=present with or without a version
but it doesn't tell why. This leaves me as a user in the position: Should I follow the linters advice or simply add an exception for the rule? If it would tellPackage installs should use state=present with or without a version because it can cause instability in the setup
orPackage installs should use state=present with or without a version because state=latest can harm makes the role no longer idempotent
.I guess I simply miss a "because" section for the default rules and it would be great to get it, as it would help to transfer knowledge and provide the ability to make better informed decisions on why a linter rule exists and whether something is intended or unintended behaviour.
Beta Was this translation helpful? Give feedback.
All reactions