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

Layout/CaseIndentation: the name of rule is not printed in description #8764

Closed
deepj opened this issue Sep 22, 2020 · 0 comments · Fixed by #8766
Closed

Layout/CaseIndentation: the name of rule is not printed in description #8764

deepj opened this issue Sep 22, 2020 · 0 comments · Fixed by #8766

Comments

@deepj
Copy link
Contributor

deepj commented Sep 22, 2020

When Layout/CaseIndentation is detected, its name is not printed in description. Other rules have it in their description.

Expected behavior

app/helpers/test_helper.rb:25:7: C: Layout/CaseIndentation: Indent when as deep as case.
    when :small then 16
    ^^^^

Actual behavior

app/helpers/test_helper.rb:25:7: C: Indent when as deep as case.
    when :small then 16
    ^^^^

Steps to reproduce the problem

    w_h = case size
      when :small then 16
      when :big then 32
      when :huge then 64
      else 24
          end

Run

rubocop --only Layout/CaseIndentation

RuboCop version

$ rubocop -V
0.91.0 (using Parser 2.7.1.4, rubocop-ast 0.4.0, running on ruby 2.7.1 x86_64-darwin18)
dvandersluis added a commit to dvandersluis/rubocop that referenced this issue Sep 22, 2020
koic added a commit that referenced this issue Sep 22, 2020
…n-message

[Fix #8764] Fix `Layout/CaseIndentation` to properly output annotated error messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant