|
| 1 | +require: rubocop-performance |
| 2 | + |
1 | 3 | AllCops: |
2 | | - TargetRubyVersion: 2.5 |
| 4 | + TargetRubyVersion: 2.6 |
3 | 5 | Exclude: |
4 | 6 | - vendor/**/* |
| 7 | + - bin/* |
5 | 8 |
|
6 | 9 | Naming/AccessorMethodName: |
7 | 10 | Description: Check the naming of accessor methods for get_/set_. |
@@ -39,6 +42,11 @@ Naming/PredicateName: |
39 | 42 | Exclude: |
40 | 43 | - spec/**/* |
41 | 44 |
|
| 45 | +Naming/RescuedExceptionsVariableName: |
| 46 | + Description: 'Use consistent rescued exceptions variables naming.' |
| 47 | + Enabled: true |
| 48 | + PreferredName: error |
| 49 | + |
42 | 50 | Style/Alias: |
43 | 51 | Description: 'Use alias_method instead of alias.' |
44 | 52 | StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method' |
@@ -133,7 +141,7 @@ Style/EvenOdd: |
133 | 141 | StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods' |
134 | 142 | Enabled: false |
135 | 143 |
|
136 | | -Style/FlipFlop: |
| 144 | +Lint/FlipFlop: |
137 | 145 | Description: 'Checks for flip flops' |
138 | 146 | StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops' |
139 | 147 | Enabled: false |
@@ -266,6 +274,13 @@ Style/RegexpLiteral: |
266 | 274 | StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r' |
267 | 275 | Enabled: false |
268 | 276 |
|
| 277 | +Style/Sample: |
| 278 | + Description: >- |
| 279 | + Use `sample` instead of `shuffle.first`, |
| 280 | + `shuffle.last`, and `shuffle[Fixnum]`. |
| 281 | + Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code' |
| 282 | + Enabled: false |
| 283 | + |
269 | 284 | Style/SelfAssignment: |
270 | 285 | Description: >- |
271 | 286 | Checks for places where self-assignment shorthand should have |
@@ -626,13 +641,6 @@ Performance/ReverseEach: |
626 | 641 | Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code' |
627 | 642 | Enabled: false |
628 | 643 |
|
629 | | -Performance/Sample: |
630 | | - Description: >- |
631 | | - Use `sample` instead of `shuffle.first`, |
632 | | - `shuffle.last`, and `shuffle[Fixnum]`. |
633 | | - Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code' |
634 | | - Enabled: false |
635 | | - |
636 | 644 | Performance/Size: |
637 | 645 | Description: >- |
638 | 646 | Use `size` instead of `count` for counting |
|
0 commit comments