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
Style/CommentedKeyword should be aware of RDoc Directives #6708
Comments
Generally we try not to hard code considerations for other libraries into RuboCop, but we do (arbitrarily) make exceptions for popular libraries. Looking at the cop, we're actually already checking for |
In the documentation, the only examples I see of inline comments are for |
Not that I can find in my code. It may be worth noting that |
Proposed fix here: #6735 |
@halostatue I'm looking at the RDoc official document, the example of I will merge the proposal #6735 that fix in compliance with the RDoc official document. BTW, Thanks always for your artifact diff-lcs gem :-) |
[Fix #6708] Style/CommentedKeyword knows :yields:
The following “comment” is an RDoc directive. It is required to be on the same line as the
def
.Expected behavior
RuboCop should not warn about commented keywords.
Actual behavior
RuboCop warns about commented keywords.
Steps to reproduce the problem
Run Rubocop over the following code:
RuboCop version
0.63.1 (using Parser 2.5.1.0, running on ruby 2.6.0 x86_64-darwin18)
The text was updated successfully, but these errors were encountered: