Skip to content

Pin rubocop to ~> 1.91.0 and fix Style/DirectiveScope offenses - #2086

Merged
Initsogar merged 1 commit into
masterfrom
fix/rubocop-1.91-directive-scope
Sep 18, 2026
Merged

Initsogar merged 1 commit into
masterfrom
fix/rubocop-1.91-directive-scope

Conversation

@Initsogar

Copy link
Copy Markdown
Contributor

Related to #2085

Proposed changes

  • Pin rubocop to ~> 1.91.0 in the gemspec (was ~> 1.82, which floats to any newer 1.x).
  • Collapse the five single-statement rubocop:disable / rubocop:enable pairs into the rubocop:disable-next directive introduced in rubocop 1.91. Comment-only change, applied by rubocop -A --only Style/DirectiveScope.

Why are these changes being made?

CI on #2085 failed on bundle exec rubocop with 5 Style/DirectiveScope offenses, none of them related to that PR. The cop is new in rubocop 1.91.0 (released 2026-09-10, rubocop/rubocop#15601). Because there is no committed lockfile, .rubocop.yml has NewCops: enable, and the gemspec only set a floor, every fresh CI run picks up the newest rubocop and enforces whatever it adds. Master was last green on 2026-08-20 with an older rubocop and would fail the same way today.

Pinning to the patch series turns this into a normal dependabot bump PR, where new offenses show up and get fixed in the same change instead of breaking unrelated PRs.

disable-next is only understood by rubocop >= 1.91, which is why the pin and the comment changes land together.

Testing instructions

Trust the CI.

Licensing

By submitting code contributions to the WPScan development team via Github Pull Requests, or any other method, it is understood that the contributor grants Automattic Inc. the unlimited, non-exclusive right to reuse, modify, and relicense the code.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 95.053% (+0.02%) from 95.036% — fix/rubocop-1.91-directive-scope into master

@Initsogar
Initsogar merged commit 924d1fe into master Sep 18, 2026
8 of 16 checks passed
@Initsogar
Initsogar deleted the fix/rubocop-1.91-directive-scope branch September 18, 2026 23:33
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.

2 participants