From 94d133f477a5694084ac974d5ee01e8a66ce777e Mon Sep 17 00:00:00 2001 From: Justin Searls Date: Fri, 28 Jun 2019 17:31:44 -0400 Subject: [PATCH] Remove Rails/* cop configurations Funny story: we had a bunch of Rails/* cops in the config all along and I was always impressed how they didn't explode for non-Rails projects, but it turns out that they were just never actually running for some reason or another. Rather than try to slam them in now just to try to get upgraded to the latest rubocop, the most prudent thing is to remove them from the config to spare our users the postinstall warning they'll get about all these Rails/* cops we were apparently never invoking anyway. Maybe it'll make sense to incorporate them at some point (like dynamically require the cop config if `defined?(Railtie)`, but there's no reason it needs to be today as part of this PR to upgrade rub{y,ocop} --- config/base.yml | 194 ------------------------------------------------ 1 file changed, 194 deletions(-) diff --git a/config/base.yml b/config/base.yml index be631aa7..ef2e4d58 100644 --- a/config/base.yml +++ b/config/base.yml @@ -1,6 +1,5 @@ require: - rubocop-performance - - rubocop-rails AllCops: # Prevent RuboCop from exploding when it finds an older-than-2.3 .ruby-version @@ -692,199 +691,6 @@ Performance/UnfreezeString: Performance/UriDefaultParser: Enabled: true -Rails/ActionFilter: - Enabled: true - EnforcedStyle: action - Include: - - app/controllers/**/*.rb - -Rails/ActiveRecordAliases: - Enabled: true - -Rails/ActiveSupportAliases: - Enabled: true - -Rails/ApplicationJob: - Enabled: true - -Rails/ApplicationRecord: - Enabled: true - -Rails/AssertNot: - Enabled: true - Include: - - '**/test/**/*' - -Rails/Blank: - Enabled: true - # Convert usages of `nil? || empty?` to `blank?` - NilOrEmpty: true - # Convert usages of `!present?` to `blank?` - NotPresent: true - # Convert usages of `unless present?` to `if blank?` - UnlessPresent: true - -Rails/BulkChangeTable: - Enabled: true - Database: null - Include: - - db/migrate/*.rb - -Rails/CreateTableWithTimestamps: - Enabled: true - Include: - - db/migrate/*.rb - -Rails/Date: - Enabled: true - EnforcedStyle: flexible - -Rails/Delegate: - Enabled: true - EnforceForPrefixed: true - -Rails/DelegateAllowBlank: - Enabled: true - -Rails/DynamicFindBy: - Enabled: true - Whitelist: - - find_by_sql - -Rails/EnumUniqueness: - Enabled: true - Include: - - app/models/**/*.rb - -Rails/EnvironmentComparison: - Enabled: true - -Rails/Exit: - Enabled: true - Include: - - app/**/*.rb - - config/**/*.rb - - lib/**/*.rb - Exclude: - - lib/**/*.rake - -Rails/FilePath: - Enabled: true - EnforcedStyle: arguments - -Rails/FindBy: - Enabled: true - Include: - - app/models/**/*.rb - -Rails/FindEach: - Enabled: true - Include: - - app/models/**/*.rb - -Rails/HasAndBelongsToMany: - Enabled: true - Include: - - app/models/**/*.rb - -Rails/HttpPositionalArguments: - Enabled: true - Include: - - 'spec/**/*' - - 'test/**/*' - -Rails/HttpStatus: - Enabled: true - EnforcedStyle: symbolic - -Rails/InverseOf: - Enabled: true - Include: - - app/models/**/*.rb - -Rails/LexicallyScopedActionFilter: - Enabled: true - Safe: false - Include: - - app/controllers/**/*.rb - -Rails/NotNullColumn: - Enabled: true - Include: - - db/migrate/*.rb - -Rails/Output: - Enabled: true - Include: - - app/**/*.rb - - config/**/*.rb - - db/**/*.rb - - lib/**/*.rb - -Rails/OutputSafety: - Enabled: true - -Rails/PluralizationGrammar: - Enabled: true - -Rails/Presence: - Enabled: true - -Rails/Present: - Enabled: true - NotNilAndNotEmpty: true - NotBlank: true - UnlessBlank: true - -Rails/ReadWriteAttribute: - Enabled: true - Include: - - app/models/**/*.rb - -Rails/RedundantReceiverInWithOptions: - Enabled: true - -Rails/RefuteMethods: - Enabled: true - Include: - - '**/test/**/*' - -Rails/RelativeDateConstant: - Enabled: true - AutoCorrect: false - -Rails/RequestReferer: - Enabled: true - EnforcedStyle: referer - -Rails/ReversibleMigration: - Enabled: true - Include: - - db/migrate/*.rb - -Rails/SafeNavigation: - Enabled: true - ConvertTry: false - -Rails/ScopeArgs: - Enabled: true - Include: - - app/models/**/*.rb - -Rails/TimeZone: - Enabled: true - EnforcedStyle: flexible - -Rails/UniqBeforePluck: - Enabled: true - EnforcedStyle: conservative - AutoCorrect: false - -Rails/Validation: - Enabled: true - Include: - - app/models/**/*.rb - Security/Eval: Enabled: true