common_rubocop_rails.yml in radius-spec-0.10.0 vs common_rubocop_rails.yml in radius-spec-0.11.0

- old
+ new

@@ -109,19 +109,29 @@ # This cop looks for uses of default_scope because named scopes are preferred: # https://rails.rubystyle.guide/#named-scopes Rails/DefaultScope: Enabled: true +# We were originally going to disable this, but after much discussion agreed that enabling +# this cop with AllowReads: true should be relatively painless. +Rails/EnvironmentVariableAccess: + Enabled: true + AllowReads: true + # Usage of `find_by` is more expressive of intent than `where.first`. We should # check all app code, not just the models to improve intent expression. # # Since rake tasks often live in `lib` we also check all of lib as well. # +# We are also disabling the default IgnoreWhereFirst that was added in version +# 2.11 +# # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/FindBy: Enabled: true + IgnoreWhereFirst: false Include: - 'app/**/*.rb' - 'lib/**/*.rb' # This cop enforces that ActiveRecord#find is used instead of where.take!, find_by!, and find_by_id! @@ -225,9 +235,13 @@ # # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/ReadWriteAttribute: Enabled: false + +# Enabling this because it is disabled by default and we want it. +Rails/ReversibleMigrationMethodDefinition: + Enabled: true # This ensures we do not ignore potential validation issues in the code. Doing # so can lead to strange and surprising bugs where records are expected to # be created, or be modified, but are not. #