config/default.yml in rubocop-rails-2.3.0 vs config/default.yml in rubocop-rails-2.3.1
- old
+ new
@@ -1,19 +1,18 @@
# Common configuration.
AllCops:
+ Exclude:
+ - bin/bundle
# What version of Rails is the inspected code using? If a value is specified
# for TargetRailsVersion then it is used. Acceptable values are specificed
# as a float (i.e. 5.1); the patch version of Rails should not be included.
# If TargetRailsVersion is not set, RuboCop will parse the Gemfile.lock or
# gems.locked file to find the version of Rails that has been bound to the
# application. If neither of those files exist, RuboCop will use Rails 5.0
# as the default.
TargetRailsVersion: ~
- # When specifying style guide URLs, any paths and/or fragments will be
- # evaluated relative to the base URL.
- StyleGuideBaseURL: https://rails.rubystyle.guide
Rails/ActionFilter:
Description: 'Enforces consistent use of action filter methods.'
Enabled: true
VersionAdded: '0.19'
@@ -138,19 +137,19 @@
Enabled: true
VersionAdded: '0.44'
Rails/DynamicFindBy:
Description: 'Use `find_by` instead of dynamic `find_by_*`.'
- StyleGuide: '#find_by'
+ StyleGuide: 'https://rails.rubystyle.guide#find_by'
Enabled: true
VersionAdded: '0.44'
Whitelist:
- find_by_sql
Rails/EnumHash:
Description: 'Prefer hash syntax over array syntax when defining enums.'
- StyleGuide: '#enums'
+ StyleGuide: 'https://rails.rubystyle.guide#enums'
Enabled: true
VersionAdded: '2.3'
Include:
- app/models/**/*.rb
@@ -190,35 +189,35 @@
- slashes
- arguments
Rails/FindBy:
Description: 'Prefer find_by over where.first.'
- StyleGuide: '#find_by'
+ StyleGuide: 'https://rails.rubystyle.guide#find_by'
Enabled: true
VersionAdded: '0.30'
Include:
- app/models/**/*.rb
Rails/FindEach:
Description: 'Prefer all.find_each over all.find.'
- StyleGuide: '#find-each'
+ StyleGuide: 'https://rails.rubystyle.guide#find-each'
Enabled: true
VersionAdded: '0.30'
Include:
- app/models/**/*.rb
Rails/HasAndBelongsToMany:
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
- StyleGuide: '#has-many-through'
+ StyleGuide: 'https://rails.rubystyle.guide#has-many-through'
Enabled: true
VersionAdded: '0.12'
Include:
- app/models/**/*.rb
Rails/HasManyOrHasOneDependent:
Description: 'Define the dependent option to the has_many and has_one associations.'
- StyleGuide: '#has_many-has_one-dependent-option'
+ StyleGuide: 'https://rails.rubystyle.guide#has_many-has_one-dependent-option'
Enabled: true
VersionAdded: '0.50'
Include:
- app/models/**/*.rb
@@ -261,11 +260,11 @@
Include:
- app/models/**/*.rb
Rails/LexicallyScopedActionFilter:
Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the controller."
- StyleGuide: '#lexically-scoped-action-filter'
+ StyleGuide: 'https://rails.rubystyle.guide#lexically-scoped-action-filter'
Enabled: true
Safe: false
VersionAdded: '0.52'
Include:
- app/controllers/**/*.rb
@@ -326,11 +325,11 @@
Rails/ReadWriteAttribute:
Description: >-
Checks for read_attribute(:attr) and
write_attribute(:attr, val).
- StyleGuide: '#read-attribute'
+ StyleGuide: 'https://rails.rubystyle.guide#read-attribute'
Enabled: true
VersionAdded: '0.20'
VersionChanged: '0.29'
Include:
- app/models/**/*.rb
@@ -377,11 +376,11 @@
- referer
- referrer
Rails/ReversibleMigration:
Description: 'Checks whether the change method of the migration file is reversible.'
- StyleGuide: '#reversible-migration'
+ StyleGuide: 'https://rails.rubystyle.guide#reversible-migration'
Reference: 'https://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html'
Enabled: true
VersionAdded: '0.47'
Include:
- db/migrate/*.rb
@@ -396,11 +395,11 @@
# implement the intended method. `try` will not raise an exception for this.
ConvertTry: false
Rails/SaveBang:
Description: 'Identifies possible cases where Active Record save! or related should be used.'
- StyleGuide: '#save-bang'
+ StyleGuide: 'https://rails.rubystyle.guide#save-bang'
Enabled: false
VersionAdded: '0.42'
VersionChanged: '0.59'
AllowImplicitReturn: true
AllowedReceivers: []
@@ -435,10 +434,10 @@
- update_counters
Whitelist: []
Rails/TimeZone:
Description: 'Checks the correct usage of time zone aware methods.'
- StyleGuide: '#time'
+ StyleGuide: 'https://rails.rubystyle.guide#time'
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
Enabled: true
Safe: false
VersionAdded: '0.30'
VersionChanged: '0.68'