secure_headers icon indicating copy to clipboard operation
secure_headers copied to clipboard

Fix code style

Open tmaier opened this issue 2 months ago • 0 comments

All PRs:

  • [x] Has tests
  • [x] Documentation updated

Summary

This PR fixes all code style issues identified by rubocop.

Changes Made:

  • Updated .rubocop.yml to use plugins: instead of require: for rubocop-performance (addresses deprecation warning)
  • Auto-fixed 79 style offenses including:
    • Changed Style/OrAssignment violations to use ||= operator
    • Converted Style/ClassMethodsDefinitions from class << self to def self. method definitions across 12 files
    • Fixed Layout/SpaceInsideHashLiteralBraces spacing issues throughout spec files
  • Manually fixed GitHub/AvoidObjectSendWithDynamicMethod warning with appropriate rubocop disable comments for intentional dynamic dispatch in test code

Verification:

  • ✅ All 247 tests pass with 0 failures
  • ✅ Rubocop shows 0 offenses
  • ✅ No functional changes, only code style improvements

~~## Adding a new header~~ Not applicable - this PR only contains code style fixes

~~## Adding a new CSP directive~~ Not applicable - this PR only contains code style fixes

tmaier avatar Nov 19 '25 14:11 tmaier