Skip to content

Conversation

@rei-moo
Copy link
Contributor

@rei-moo rei-moo commented Dec 10, 2025

Updates our rubocop config to prevent lint errors from blocking CI.

Once #560 is unblocked we can focus on Ruby 4.0 support and cleaning up the linting rules that were disabled in this PR.

All PRs:

  • Has tests
  • Documentation updated

@rei-moo rei-moo force-pushed the rei-moo/linting-fix branch 3 times, most recently from a9ace08 to 0fc7ed6 Compare December 11, 2025 16:08
@rei-moo rei-moo force-pushed the rei-moo/linting-fix branch 3 times, most recently from 35a4d57 to d958229 Compare December 11, 2025 16:28
@rei-moo rei-moo requested a review from a team December 11, 2025 16:31
@rei-moo rei-moo marked this pull request as ready for review December 11, 2025 16:31
Copilot AI review requested due to automatic review settings December 11, 2025 16:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Rubocop configuration to prevent lint errors from blocking CI until Ruby 4.0 support work and linting cleanup can be completed. The changes temporarily disable several style and lint cops while also updating a test to use public_send instead of send to address GitHub's custom linting rule.

  • Disables five Rubocop cops that were causing CI failures across different Ruby versions
  • Changes method invocation from send to public_send in a spec test for public attribute access
  • Sets TargetRubyVersion to 2.6 to ensure consistent linting behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.rubocop.yml Adds configuration to disable five cops (Style/ClassMethodsDefinitions, Style/OrAssignment, Layout/SpaceInsideHashLiteralBraces, Lint/ParenthesesAsGroupedExpression, Lint/RedundantCopDisableDirective) and sets TargetRubyVersion to 2.6
spec/lib/secure_headers/configuration_spec.rb Updates test to use public_send instead of send for accessing public attributes, with inline cop disablement for GitHub/AvoidObjectSendWithDynamicMethod

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +22 to +23
Lint/RedundantCopDisableDirective:
Enabled: false
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling the Lint/RedundantCopDisableDirective cop will hide instances where rubocop disable directives are no longer needed. This makes it harder to maintain clean code and remove outdated suppressions over time. Consider keeping this cop enabled to track when directives become redundant as rules change.

Suggested change
Lint/RedundantCopDisableDirective:
Enabled: false

Copilot uses AI. Check for mistakes.
@rei-moo rei-moo merged commit a11f8a4 into main Dec 11, 2025
29 checks passed
@rei-moo rei-moo deleted the rei-moo/linting-fix branch December 11, 2025 18:04
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.

4 participants