Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,22 @@ inherit_gem:
rubocop-github:
- config/default.yml
require: rubocop-performance

AllCops:
TargetRubyVersion: 2.6

# Disable cops that are not consistently available across all Ruby versions
Style/ClassMethodsDefinitions:
Enabled: false

Style/OrAssignment:
Enabled: false

Layout/SpaceInsideHashLiteralBraces:
Enabled: false

Lint/ParenthesesAsGroupedExpression:
Enabled: false

Lint/RedundantCopDisableDirective:
Enabled: false
Comment on lines +22 to +23
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.
4 changes: 3 additions & 1 deletion spec/lib/secure_headers/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ module SecureHeaders
configuration = Configuration.dup
expect(original_configuration).not_to be(configuration)
Configuration::CONFIG_ATTRIBUTES.each do |attr|
expect(original_configuration.send(attr)).to eq(configuration.send(attr))
# rubocop:disable GitHub/AvoidObjectSendWithDynamicMethod
expect(original_configuration.public_send(attr)).to eq(configuration.public_send(attr))
# rubocop:enable GitHub/AvoidObjectSendWithDynamicMethod
end
end

Expand Down
Loading