Move performance and security rules to basic cops
As mentioned in commit 9d566a22, I've kept these performance cops but
not for performance reasons but because they make the code easier to
read.
As for the security cops, we've never had problems with any of them, but
since we recently added an `eval` call by accident, there's a chance we
could do the same with JSONLoad and YAMLLoad.
This commit is contained in:
22
.rubocop.yml
22
.rubocop.yml
@@ -1,25 +1,3 @@
|
|||||||
inherit_from: .rubocop_basic.yml
|
inherit_from: .rubocop_basic.yml
|
||||||
|
|
||||||
Performance/CompareWithBlock:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Performance/Detect:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Performance/DoubleStartEndWith:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Performance/EndWith:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Performance/StartWith:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Rails/HasManyOrHasOneDependent:
|
Rails/HasManyOrHasOneDependent:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Security/JSONLoad:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Security/YAMLLoad:
|
|
||||||
Enabled: true
|
|
||||||
|
|||||||
@@ -170,6 +170,21 @@ Metrics/LineLength:
|
|||||||
Max: 110
|
Max: 110
|
||||||
Severity: refactor
|
Severity: refactor
|
||||||
|
|
||||||
|
Performance/CompareWithBlock:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Performance/Detect:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Performance/DoubleStartEndWith:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Performance/EndWith:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Performance/StartWith:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Rails/ActionFilter:
|
Rails/ActionFilter:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
@@ -331,6 +346,12 @@ RSpec/VoidExpect:
|
|||||||
Security/Eval:
|
Security/Eval:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Security/JSONLoad:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Security/YAMLLoad:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/BlockDelimiters:
|
Style/BlockDelimiters:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user