Skip to content

fix(ci): update rubocop for ruby 4.0 and ignore brakeman false positive - #217

Open
jaspermayone wants to merge 1 commit into
mainfrom
fix/ci-rubocop-prism
Open

jaspermayone wants to merge 1 commit into
mainfrom
fix/ci-rubocop-prism

Conversation

@jaspermayone

Copy link
Copy Markdown
Member

What

Fix the red lint and scan_ruby jobs in CI.

Why

  • lint crashed with cannot load such file -- prism/translation/parser34. Rubocop 1.81.6 and rubocop-ast 1.47.1 do not work with Ruby 4.0.1.
  • scan_ruby failed on one Brakeman warning (HTTP Verb Confusion). The warning is a false positive. The line above it already returns false for HEAD requests.

Changes

  • Update rubocop from 1.81.6 to 1.92.0 and rubocop-ast from 1.47.1 to 1.50.0. Prism stays at 1.9.0.
  • Add the Brakeman warning to config/brakeman.ignore with a note.
  • Allow find_by_public_param, find_by_public_param! and find_by_public_id in Rails/DynamicFindBy. These are our own methods from PublicParamLookup. The autocorrect would break them.
  • Fix the offenses that the crash had hidden. Layout and rescue fixes are autocorrected. Five RSpec/MessageSpies offenses in two specs now use expect(...).to receive.

Notes

PR #215 fails for the same reason. It needs a rebase after this PR merges.

@jaspermayone
jaspermayone requested a review from a team October 15, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant