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:
Javi Martín
2019-10-25 03:26:38 +02:00
parent f3c31f0ea3
commit c06186a111
2 changed files with 21 additions and 22 deletions

View File

@@ -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

View File

@@ -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