From 0ea46b884b6abfcd89d8dba17202030d7a8c0471 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 26 Apr 2023 22:19:45 +0100 Subject: [PATCH] Fix `Rails` cop enablement now `EnabledByDefault` is set - These were `Enabled: false` for the whole group of Rails cops, so my removing the `Enabled: true` cops (what I thought was "redundant" config in the previous commit) meant the specific ones we wanted to use weren't enabled at all. - Instead, let's reverse that by unsetting `Enabled: false` for the whole group, and then disabling the specific cops with offenses that we haven't got around to deciding if we care about yet. --- Library/.rubocop.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 578b2c0c2f..cb3d161767 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -235,8 +235,6 @@ Performance/OpenStruct: Enabled: false Rails: - # Selectively enable what we want. - Enabled: false # Do not use ActiveSupport in RuboCops. Exclude: - "Homebrew/rubocops/**/*" @@ -244,6 +242,22 @@ Rails: Rails/Delegate: Enabled: false # TODO +# TODO: This group of cops comes from `EnabledByDefault: true`. We should maybe enable the ones with < 100 offenses. +Rails/ArelStar: + Enabled: false +Rails/Date: + Enabled: false +Rails/RakeEnvironment: + Enabled: false +Rails/Pluck: + Enabled: false +Rails/SaveBang: + Enabled: false +Rails/SkipsModelValidations: + Enabled: false +Rails/TimeZone: + Enabled: false + # Intentionally disabled as it doesn't fit with our code style. RSpec/AnyInstance: Enabled: false