diff --git a/.rubocop.yml b/.rubocop.yml index 2007b91dc..ca3696b9b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -354,6 +354,14 @@ Naming/BlockForwarding: - "app/controllers/management/base_controller.rb" - "app/controllers/subscriptions_controller.rb" +Naming/PredicateMethod: + Enabled: true + Exclude: + - "app/models/local_census_records/import.rb" + - "app/models/user.rb" + - "app/models/verification/management/email.rb" + - "config/initializers/foundation_form_builder.rb" + Naming/RescuedExceptionsVariableName: Enabled: true @@ -725,9 +733,15 @@ Style/ClassVars: Style/CollectionMethods: Enabled: true +Style/ComparableBetween: + Enabled: true + Style/DigChain: Enabled: true +Style/EmptyStringInsideInterpolation: + Enabled: true + Style/FileRead: Enabled: true @@ -811,6 +825,9 @@ Style/RaiseArgs: Style/RedundantArgument: Enabled: true +Style/RedundantArrayFlatten: + Enabled: true + Style/RedundantBegin: Enabled: true diff --git a/Gemfile b/Gemfile index c4a829ae6..405321d49 100644 --- a/Gemfile +++ b/Gemfile @@ -100,7 +100,7 @@ group :development do gem "pronto-eslint", "~> 0.11.1", require: false gem "pronto-rubocop", "~> 0.11.6", require: false gem "pronto-stylelint", "~> 0.11.1", require: false - gem "rubocop", "~> 1.71.2", require: false + gem "rubocop", "~> 1.76.1", require: false gem "rubocop-capybara", "~> 2.21.0", require: false gem "rubocop-factory_bot", "~> 2.26.1", require: false gem "rubocop-performance", "~> 1.23.1", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 3c3294158..6dbad9f61 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -337,7 +337,7 @@ GEM rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - language_server-protocol (3.17.0.4) + language_server-protocol (3.17.0.5) launchy (3.1.1) addressable (~> 2.8) childprocess (~> 5.0) @@ -349,6 +349,7 @@ GEM letter_opener (~> 1.9) railties (>= 6.1) rexml + lint_roller (1.1.0) logger (1.7.0) loofah (2.24.0) crass (~> 1.0.2) @@ -444,7 +445,7 @@ GEM rack orm_adapter (0.5.0) ostruct (0.6.1) - parallel (1.26.3) + parallel (1.27.0) paranoia (3.0.1) activerecord (>= 6, < 8.1) parser (3.3.8.0) @@ -460,6 +461,7 @@ GEM pg_search (2.3.7) activerecord (>= 6.1) activesupport (>= 6.1) + prism (1.4.0) pronto (0.11.4) gitlab (>= 4.4.0, < 5.0) httparty (>= 0.13.7, < 1.0) @@ -574,18 +576,20 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.2) - rubocop (1.71.2) + rubocop (1.76.1) 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.38.0, < 2.0) + rubocop-ast (>= 1.45.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.38.1) - parser (>= 3.3.1.0) + rubocop-ast (1.45.1) + parser (>= 3.3.7.2) + prism (~> 1.4) rubocop-capybara (2.21.0) rubocop (~> 1.41) rubocop-factory_bot (2.26.1) @@ -811,7 +815,7 @@ DEPENDENCIES rinku (~> 2.0.6) ros-apartment (~> 3.2.0) rspec-rails (~> 7.1.1) - rubocop (~> 1.71.2) + rubocop (~> 1.76.1) rubocop-capybara (~> 2.21.0) rubocop-factory_bot (~> 2.26.1) rubocop-performance (~> 1.23.1) diff --git a/app/components/admin/poll/shifts/form_component.rb b/app/components/admin/poll/shifts/form_component.rb index 5a0c626ba..8bdcf7bf2 100644 --- a/app/components/admin/poll/shifts/form_component.rb +++ b/app/components/admin/poll/shifts/form_component.rb @@ -20,7 +20,7 @@ class Admin::Poll::Shifts::FormComponent < ApplicationComponent def shift_vote_collection_dates return [] if voting_polls.blank? - date_options((voting_start_date..voting_end_date), Poll::Shift.tasks[:vote_collection]) + date_options(voting_start_date..voting_end_date, Poll::Shift.tasks[:vote_collection]) end def shift_recount_scrutiny_dates diff --git a/app/components/budgets/groups_and_headings_component.html.erb b/app/components/budgets/groups_and_headings_component.html.erb index 6f44960dd..a10282aa7 100644 --- a/app/components/budgets/groups_and_headings_component.html.erb +++ b/app/components/budgets/groups_and_headings_component.html.erb @@ -5,7 +5,7 @@ <% group.headings.sort_by_name.each do |heading| %>
  • <%= link_to_unless( - (budget.informing? || budget.finished?), + budget.informing? || budget.finished?, heading.name, budget_investments_path(budget.id, heading_id: heading.id) ) %> diff --git a/app/components/sdg/goals/help_page_component.html.erb b/app/components/sdg/goals/help_page_component.html.erb index af052dd8b..0946cbdc3 100644 --- a/app/components/sdg/goals/help_page_component.html.erb +++ b/app/components/sdg/goals/help_page_component.html.erb @@ -9,7 +9,7 @@

    <%= t("sdg.goals.help.description") %>