diff --git a/.rubocop.yml b/.rubocop.yml index 47498329c..26ae7b5da 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -337,6 +337,9 @@ Naming/BlockForwarding: - "app/controllers/management/base_controller.rb" - "app/controllers/subscriptions_controller.rb" +Naming/RescuedExceptionsVariableName: + Enabled: true + Naming/VariableName: Enabled: true @@ -784,6 +787,12 @@ Style/RedundantInterpolation: Style/RedundantParentheses: Enabled: true +Style/RedundantRegexpArgument: + Enabled: true + +Style/RedundantRegexpCharacterClass: + Enabled: true + Style/RedundantReturn: Enabled: true diff --git a/Gemfile b/Gemfile index ab2c9813e..b4a5f3158 100644 --- a/Gemfile +++ b/Gemfile @@ -98,7 +98,7 @@ group :development do gem "pronto-eslint", "~> 0.11.1", require: false gem "pronto-rubocop", "~> 0.11.5", require: false gem "pronto-stylelint", "~> 0.10.3", require: false - gem "rubocop", "~> 1.64.1", require: false + gem "rubocop", "~> 1.66.1", require: false gem "rubocop-capybara", "~> 2.21.0", require: false gem "rubocop-factory_bot", "~> 2.26.1", require: false gem "rubocop-performance", "~> 1.22.1", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 092eaacd2..579836807 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -538,15 +538,14 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) - rubocop (1.64.1) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) @@ -769,7 +768,7 @@ DEPENDENCIES rinku (~> 2.0.6) ros-apartment (~> 2.11.0) rspec-rails (~> 7.0.1) - rubocop (~> 1.64.1) + rubocop (~> 1.66.1) rubocop-capybara (~> 2.21.0) rubocop-factory_bot (~> 2.26.1) rubocop-performance (~> 1.22.1) diff --git a/app/models/machine_learning.rb b/app/models/machine_learning.rb index f7bb3503e..5541d3327 100644 --- a/app/models/machine_learning.rb +++ b/app/models/machine_learning.rb @@ -62,9 +62,9 @@ class MachineLearning job.update!(finished_at: Time.current) Mailer.machine_learning_success(user).deliver_later - rescue Exception => error - handle_error(error) - raise error + rescue Exception => e + handle_error(e) + raise e end end handle_asynchronously :run, queue: "machine_learning" diff --git a/app/models/signature_sheet.rb b/app/models/signature_sheet.rb index 713d6ef71..d123967be 100644 --- a/app/models/signature_sheet.rb +++ b/app/models/signature_sheet.rb @@ -39,7 +39,7 @@ class SignatureSheet < ApplicationRecord end def parsed_required_fields_to_verify_groups - required_fields_to_verify.split(/[;]/).map { |d| d.gsub(/\s+/, "") }.map { |group| group.split(/[,]/) } + required_fields_to_verify.split(";").map { |d| d.gsub(/\s+/, "") }.map { |group| group.split(",") } end def signable_found