Commit 0bbd218
committed
Apply
This commit applies `rubocop --auto-gen-config` to suppress the following offense:
```console
$ bundle exec rubocop
(snip)
Offenses:
lib/rubocop/cop/rails/blank.rb:126:35: C: [Correctable] InternalAffairs/CopEnabled:
Use config.cop_enabled?('Style/UnlessElse') instead of config.for_cop('Style/UnlessElse')['Enabled'].
return if node.else? && config.for_cop('Style/UnlessElse')['Enabled']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rails/present.rb:113:35: C: [Correctable] InternalAffairs/CopEnabled:
Use config.cop_enabled?('Style/UnlessElse') instead of config.for_cop('Style/UnlessElse')['Enabled'].
return if node.else? && config.for_cop('Style/UnlessElse')['Enabled']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
296 files inspected, 2 offenses detected, 2 offenses autocorrectable
RuboCop failed!
```
In the future, the offense of `InternalAffairs/CopEnabled` can be autocorrected,
but raising the minimum required RuboCop version just for that should be avoided.rubocop --auto-gen-config
1 parent e470d18 commit 0bbd218
1 file changed
+19
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
| |||
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 26 | + | |
24 | 27 | | |
25 | | - | |
| 28 | + | |
26 | 29 | | |
27 | | - | |
28 | | - | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | | - | |
33 | | - | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
39 | | - | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | | - | |
| 44 | + | |
42 | 45 | | |
43 | | - | |
44 | | - | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
0 commit comments