Skip to content
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/EndBlock & Lint/EndInMethod are redundant #7813

Closed
tejasbubane opened this issue Mar 22, 2020 · 1 comment · Fixed by #7817
Closed

Style/EndBlock & Lint/EndInMethod are redundant #7813

tejasbubane opened this issue Mar 22, 2020 · 1 comment · Fixed by #7817

Comments

@tejasbubane
Copy link
Contributor

Both Style/EndBlock & Lint/EndInMethod do the same thing. END block being inside/outside method makes no difference.

Both were added long back in 0.9.0.

Commits don't tell the reasoning either: [1] & [2]

Also the documentation of Lint/EndInMethod suggests END outside method is good which contradicts Style/EndBlock.


Expected behavior

One cop to deal with END blocks.

Actual behavior

Duplicate cops.

Steps to reproduce the problem

NA

RuboCop version

Current master branch.

@bbatsov
Copy link
Collaborator

bbatsov commented Mar 23, 2020

Great catch! Looking at 8466928 it seems I did this first and then created the other cop based on the remark @whitequark made. I agree it probably doesn't make sense to have two of those.

tejasbubane added a commit to tejasbubane/rubocop that referenced this issue Mar 23, 2020
ipmsteven added a commit to ipmsteven/rubocop-github that referenced this issue Apr 18, 2020
ipmsteven added a commit to ipmsteven/rubocop-github that referenced this issue Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants