[go: up one dir, main page]

Skip to content

Inconsistent config in rubocop between lefthook and pipeline

Problem

The file trigger rule for rubocop in lefthook is incomplete. It will causes errors that should be reported in lefthook to be delayed in the pipeline.

Reproduce

Add content to Gemfile that does not match the rubocop rules, and then check it with lefthook run pre-push. lefthook will skip the rubocop check because of NO FILES FOR INSPECTION.

Solution

  • Remove the rubocop filter from lefthook.
  • Synchronization rules to rubocop filter in lefthook.
Edited by LXY