Skip to content

Commit 7ac275c

Browse files
authored
Merge pull request #7046 from ccutrer/fix-pre-commit
fix pre-commit hook failing rubocop on non-ruby files
2 parents 78e31d4 + 370300f commit 7ac275c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.githooks/pre-commit-rubocop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ length=${#files}
55

66
# Run rubocop hook only when analyzable files are present
77
if [[ $length -ne 0 ]]; then
8-
./bin/rubocop $files
8+
./bin/rubocop --only-recognized-file-types $files
99
else
1010
echo "No files to analyze"
1111
fi

0 commit comments

Comments
 (0)