diff --git a/.rubocop.yml b/.rubocop.yml index a383a9172..73f1d18f0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -96,10 +96,19 @@ Style/FrozenStringLiteralComment: - 'config.ru' - 'config/additional_environment.rb' +Style/HashEachMethods: + Enabled: true + Style/HashSyntax: Enabled: true EnforcedStyle: no_mixed_keys +Style/HashTransformKeys: + Enabled: true + +Style/HashTransformValues: + Enabled: true + Style/IdenticalConditionalBranches: Exclude: - 'config/initializers/10-patches.rb' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 110834848..0e499a5a5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 20 --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 0.79.0. +# using RuboCop version 0.80.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -493,7 +493,7 @@ Naming/MethodName: - 'test/helpers/application_helper_test.rb' # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: io, id, to, by, on, in, at, ip, db, os +# AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp Naming/MethodParameterName: Enabled: false @@ -984,7 +984,7 @@ Style/BlockComments: - 'lib/diff.rb' # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners. +# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object # FunctionalMethods: let, let!, subject, watch @@ -992,12 +992,6 @@ Style/BlockComments: Style/BlockDelimiters: Enabled: false -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: braces, no_braces, context_dependent -Style/BracesAroundHashParameters: - Enabled: false - # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, EnforcedStyle. # SupportedStyles: nested, compact @@ -1149,6 +1143,16 @@ Style/GlobalVars: Style/GuardClause: Enabled: false +# Cop supports --auto-correct. +Style/HashEachMethods: + Exclude: + - 'app/controllers/application_controller.rb' + - 'app/controllers/groups_controller.rb' + - 'app/models/mailer.rb' + - 'app/models/role.rb' + - 'test/functional/issues_custom_fields_visibility_test.rb' + - 'test/unit/auth_source_ldap_test.rb' + # Configuration parameters: AllowIfModifier. Style/IfInsideElse: Exclude: diff --git a/Gemfile b/Gemfile index e9b751e79..b8bad69f6 100644 --- a/Gemfile +++ b/Gemfile @@ -87,7 +87,7 @@ group :test do gem 'capybara', (RUBY_VERSION < '2.4' ? '~> 3.15.1' : '~> 3.31.0') gem "selenium-webdriver" # RuboCop - gem 'rubocop', '~> 0.79.0' + gem 'rubocop', '~> 0.80.0' gem 'rubocop-performance', '~> 1.5.0' gem 'rubocop-rails', '~> 2.4.0' end