Skip to content

Lefthook: Do not reveal RuboCop TODOs for HAML lint

Peter Leitzen requested to merge pl-lefthook-reveal-rubocop-todo into master

What does this MR do and why?

Having REVEAL_RUBOCOP_TODO=1 reveals RuboCop TODOs also for HAML lint which and sometimes prevents pushing code.

This commit hides any RuboCop TODOs in lefthook also for HAML lint.

This came up during the review of !85427 (comment 930922947).

Refs !56851 (merged)

Screenshots or screen recordings

Before 💥 After
Screenshot_from_2022-05-06_09-19-09 Screenshot_from_2022-05-06_09-19-26

How to set up and validate locally

  1. Reveal RuboCop TODOs via export REVEAL_RUBOCOP_TODO=1
  2. Create a new branch git checkout -b test
  3. Make change to a HAML file via echo >> app/views/projects/buttons/_clone.html.haml
  4. Commit the change git commit -m "test" app/views/projects/buttons/_clone.html.haml
  5. Run lefthook pre-push via `bundle exec lefthook run pre-push
  6. Lefthook will fail Before 💥 this change and pass After the change.

MR acceptance checklist

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

Edited by Peter Leitzen

Merge request reports

Loading