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

Suppress RuboCop 1.8's new offense #188

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

koic
Copy link
Member

@koic koic commented Jul 3, 2021

This PR suppresses and auto-corrects the following RuboCop 1.8's new offense.

% bundle exec rubocop -a
(snip)

Inspecting 3 files
CCC

Offenses:

lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:350:13: C:
[Corrected] Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.
"#{@cur_child_var} || true)"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/ast/node_pattern/parser.rb:55:13: C: [Corrected]
Layout/LineEndStringConcatenationIndentation: Align parts of a string concatenated with backslash.
"but got expression matching multiple elements: #{detail}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/rubocop/ast/node_pattern_spec.rb:948:9: C: [Corrected]
Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.
'[!nil {($_ sym $_) (send ($_ $_) :object_id)}]}'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3 files inspected, 3 offenses detected, 3 offenses corrected

@koic
Copy link
Member Author

koic commented Jul 3, 2021

CI failure is not related to this PR change because it is the same error as below.
rubocop/rubocop#9808 (comment)

This PR suppresses and auto-corrects the following RuboCop 1.8's new offense.

```console
% bundle exec rubocop -a
(snip)

Inspecting 3 files
CCC

Offenses:

lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:350:13: C:
[Corrected] Layout/LineEndStringConcatenationIndentation: Indent the
first part of a string concatenated with backslash.
"#{@cur_child_var} || true)"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/ast/node_pattern/parser.rb:55:13: C: [Corrected]
Layout/LineEndStringConcatenationIndentation: Align parts of a string
concatenated with backslash.
"but got expression matching multiple elements: #{detail}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/rubocop/ast/node_pattern_spec.rb:948:9: C: [Corrected]
Layout/LineEndStringConcatenationIndentation: Indent the first part of a
string concatenated with backslash.
'[!nil {($_ sym $_) (send ($_ $_) :object_id)}]}'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3 files inspected, 3 offenses detected, 3 offenses corrected
```
@koic koic force-pushed the suppress_rubocop_18_new_offense branch from ad33261 to 0d8c631 Compare July 4, 2021 08:27
@marcandre marcandre merged commit 0925664 into rubocop:master Jul 5, 2021
@marcandre
Copy link
Contributor

Thanks @koic

@koic koic deleted the suppress_rubocop_18_new_offense branch July 5, 2021 00:56
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 this pull request may close these issues.

None yet

2 participants