diff --git a/.rubocop.yml b/.rubocop.yml index 9ab6f6b3..498146bc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,10 +12,18 @@ AllCops: - 'bundle/**/*' - 'config/**/*' - 'bin/*' - + TargetRubyVersion: 2.4 #################### Metrics ############################### +# Start with cops for Ruby >= 2.3 disabled +Style/FrozenStringLiteralComment: + Enabled: false +Style/SafeNavigation: + Enabled: false +Style/NumericPredicate: + Enabled: false + # Avoid deep blocks nesting Metrics/BlockNesting: Max: 4 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 5486bd0c..b9695025 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -277,7 +277,7 @@ Lint/IneffectiveAccessModifier: - 'app/models/conference.rb' # Offense count: 2 -Lint/RescueWithoutErrorClass: +Style/RescueStandardError: Exclude: - 'app/controllers/users/omniauth_callbacks_controller.rb' - 'lib/tasks/migrate_config.rake' @@ -705,8 +705,11 @@ Style/TernaryParentheses: # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline. # SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInLiteral: +Style/TrailingCommaInArrayLiteral: Exclude: - 'Guardfile' + +Style/TrailingCommaInHashLiteral: + Exclude: - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' - 'spec/models/conference_spec.rb'