Skip to content

RuboCop: Enable previously disabled cop Layout/SpaceInsideParens

What does this MR do and why?

Describe in detail what your merge request does and why.

Re-enables the Layout/SpaceInsideParens cop as requested in #369268 (closed) and puts the cop in grace period.

It also fixes all offenses in HAML files.

Done via:

  1. Add Details: grace period to .rubocop_todo/layout/space_inside_parens.yml
  2. Regenerate todos via rake rubocop:todo:generate[Layout/SpaceInsideParens]
  3. Fix offenses in HAML files
unset REVEAL_RUBOCOP_TODO

files=$(bundle exec haml-lint --parallel {,ee/}app/views | rg -o -r '$1' '^([^:]+):\d+' | uniq)

sed -i 's/( /(/g' $files
sed -i 's/ )/)/g' $files 

bundle exec haml-lint --parallel {,ee/}app/views
39 files inspected, 0 lints detected

How to set up and validate locally

bundle exec rubocop --only Layout/SpaceInsideParens
bundle exec haml-link {,ee/}app/views

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #369268 (closed)

Edited by Peter Leitzen

Merge request reports