diff --git a/.rubocop.yml b/.rubocop.yml index a903fd4678..19af6b86de 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,13 +10,15 @@ inherit_gem: inherit_from: .rubocop_todo.yml -require: - - rubocop-rails +plugins: - rubocop-performance - - standard - standard-rails - standard-performance +require: + - rubocop-rails + - standard + AllCops: Exclude: - "vendor/**/*" diff --git a/Gemfile.lock b/Gemfile.lock index 7155fff754..5b63def7ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -329,7 +329,7 @@ GEM actionview (>= 5.0.0) activesupport (>= 5.0.0) jmespath (1.6.2) - json (2.10.2) + json (2.11.3) jwt (2.10.1) base64 kaminari (1.2.2) @@ -454,8 +454,8 @@ GEM paper_trail (16.0.0) activerecord (>= 6.1) request_store (~> 1.4) - parallel (1.26.3) - parser (3.3.7.4) + parallel (1.27.0) + parser (3.3.8.0) ast (~> 2.4.1) racc pdf-core (0.10.0) @@ -596,22 +596,24 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.2) - rubocop (1.70.0) + rubocop (1.75.4) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.36.2, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.43.0) + rubocop-ast (1.44.1) parser (>= 3.3.7.2) prism (~> 1.4) - rubocop-performance (1.23.1) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-performance (1.25.0) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) rubocop-rails (2.25.1) activesupport (>= 4.2.0) rack (>= 1.1) @@ -672,18 +674,18 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) stackprof (0.2.27) - standard (1.44.0) + standard (1.49.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.70.0) + rubocop (~> 1.75.2) standard-custom (~> 1.0.0) - standard-performance (~> 1.6) + standard-performance (~> 1.8) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.6.0) + standard-performance (1.8.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.23.0) + rubocop-performance (~> 1.25.0) standard-rails (1.1.0) lint_roller (~> 1.0) rubocop-rails (~> 2.25.0) diff --git a/app/services/partners/update_family.rb b/app/services/partners/update_family.rb index 7946970ac0..407944e2d9 100644 --- a/app/services/partners/update_family.rb +++ b/app/services/partners/update_family.rb @@ -3,7 +3,7 @@ module Partners module UpdateFamily extend ServiceObjectErrorsMixin - # rubocop:disable Rails::SkipsModelValidations + # rubocop:disable Rails/SkipsModelValidations def self.archive(family) if family.children.exists? ActiveRecord::Base.transaction do @@ -16,6 +16,6 @@ def self.archive(family) end self end - # rubocop:enable Rails::SkipsModelValidations + # rubocop:enable Rails/SkipsModelValidations end end diff --git a/spec/services/organization_update_service_spec.rb b/spec/services/organization_update_service_spec.rb index 5943bc71a0..1a9e980aa6 100644 --- a/spec/services/organization_update_service_spec.rb +++ b/spec/services/organization_update_service_spec.rb @@ -95,9 +95,9 @@ before do organization.update!(enable_individual_requests: false) # Want to have an invalid email on purpose - # rubocop:disable Rails::SkipsModelValidations + # rubocop:disable Rails/SkipsModelValidations partner_one.update_columns(email: "not/an_email") - # rubocop:enable Rails::SkipsModelValidations + # rubocop:enable Rails/SkipsModelValidations end it "updates the organization and returns true" do @@ -113,9 +113,9 @@ before do organization.update!(enable_individual_requests: false) # Want to have an invalid email on purpose - # rubocop:disable Rails::SkipsModelValidations + # rubocop:disable Rails/SkipsModelValidations profile.update_columns(pick_up_email: "not/an/email") - # rubocop:enable Rails::SkipsModelValidations + # rubocop:enable Rails/SkipsModelValidations end it "returns false" do diff --git a/spec/services/partner_profile_update_service_spec.rb b/spec/services/partner_profile_update_service_spec.rb index 97108d73ba..eb3097d669 100644 --- a/spec/services/partner_profile_update_service_spec.rb +++ b/spec/services/partner_profile_update_service_spec.rb @@ -100,9 +100,9 @@ before do # Want to have an invalid email on purpose - # rubocop:disable Rails::SkipsModelValidations + # rubocop:disable Rails/SkipsModelValidations partner.update_columns(email: "not/an_email") - # rubocop:enable Rails::SkipsModelValidations + # rubocop:enable Rails/SkipsModelValidations end it "returns failure" do