Skip to content

Commit 370300f

Browse files
committed
fix pre-commit hook failing rubocop on non-ruby files
if you changed a man page, it was force-feeding that to rubocop, and it would fail every line as unparseable
1 parent 28f813b commit 370300f

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)