Skip to content

Commit

Permalink
Remove Rails/* cop configurations
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
searls committed Jul 9, 2019
1 parent da26231 commit 94d133f
Showing 1 changed file with 0 additions and 194 deletions.
194 changes: 0 additions & 194 deletions 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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 94d133f

Please sign in to comment.