You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a false positive from the Style/CommentedKeyword cop in one of my codebases. It looks like RuboCop gets confused by the combination of a class_eval and a %[] string. Details below.
Expected behavior
No Style/CommentedKeyword warning.
Actual behavior
lib/kbsecret/record/abstract.rb:55:17: C: Style/CommentedKeyword: Do not place comments on the same line as the def keyword.
def #{field}
^^^^^^^^
Steps to reproduce the problem
This is the most minimal example I could come up with:
I'm getting a false positive from the
Style/CommentedKeyword
cop in one of my codebases. It looks like RuboCop gets confused by the combination of aclass_eval
and a%[]
string. Details below.Expected behavior
No Style/CommentedKeyword warning.
Actual behavior
Steps to reproduce the problem
This is the most minimal example I could come up with:
The actual offending code in my own codebase is here: https://github.com/kbsecret/kbsecret/blob/master/lib/kbsecret/record/abstract.rb#L53
RuboCop version
Include the output of
rubocop -V
. Here's an example:The text was updated successfully, but these errors were encountered: