From c06186a11193fa7b6d9d1c4467dd18e8a67e200e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 25 Oct 2019 03:26:38 +0200 Subject: [PATCH] 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. --- .rubocop.yml | 22 ---------------------- .rubocop_basic.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 10cd15e9a..59bdce84d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,25 +1,3 @@ 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: Enabled: true - -Security/JSONLoad: - Enabled: true - -Security/YAMLLoad: - Enabled: true diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index 6ae2b10af..4e85f36ec 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -170,6 +170,21 @@ Metrics/LineLength: Max: 110 Severity: refactor +Performance/CompareWithBlock: + Enabled: true + +Performance/Detect: + Enabled: true + +Performance/DoubleStartEndWith: + Enabled: true + +Performance/EndWith: + Enabled: true + +Performance/StartWith: + Enabled: true + Rails/ActionFilter: Enabled: true @@ -331,6 +346,12 @@ RSpec/VoidExpect: Security/Eval: Enabled: true +Security/JSONLoad: + Enabled: true + +Security/YAMLLoad: + Enabled: true + Style/BlockDelimiters: Enabled: true