Skip to content

Commit

Permalink
pre-commit: check Gemfile too...
Browse files Browse the repository at this point in the history
  • Loading branch information
pch committed Jan 21, 2024
1 parent b7c581d commit 84cbc39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
set -e

# Ruby
staged_files="$(git diff --cached --name-only --diff-filter=ACM . | grep '\.rb$' || true)"
staged_files="$(git diff --cached --name-only --diff-filter=ACM . | grep -E '(Gemfile|\.rb)$' || true)"

if [ -n "$staged_files" ]; then
bundle exec rubocop -c .rubocop.yml --auto-correct --fail-level autocorrect $staged_files
Expand Down

0 comments on commit 84cbc39

Please sign in to comment.