Replies: 1 comment 1 reply
-
Some cops do this, https://docs.rubocop.org/rubocop/cops_lint.html#lintconstantdefinitioninblock for example has a "References" section at the bottom which links to https://rubystyle.guide/#no-constant-definition-in-block Overall ~200 cops have this, out of the ~550 total. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Something that I come across quite often is getting a code violation, then Googling the cop to see what options the rule has. Then I get curious. Why does this rule exist? I know there is the Ruby Style Guide where I think the rules are explained in plain English. If so, shouldn't the rule documentation link to these?
Otherwise I have to search issues and hope to find the original discussion. And by the end of the journey, I lose a bit of steam and just disable the rule entirely because I'm not sure if I'm doing the right thing.
Have I missed something really obvious in the documentation that would help? I just want to read why a rule exists, why it's "bad", then I can decide whether or not to enable it.
Beta Was this translation helpful? Give feedback.
All reactions