Skip to content

Commit 073c668

Browse files
committed
Merge pull request #12 from todb-r7/commit-hooks-should-only-check-modules
Land 12 from todb, only pre-commit-hook on actual modules
2 parents 622e8a7 + dbdb4af commit 073c668

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/dev/pre-commit-hook.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ def merge_error_message
5050

5151
changed_files.each_line do |fname|
5252
fname.strip!
53-
next unless File.exist?(fname) and File.file?(fname)
54-
next unless fname =~ /modules.+\.rb/
53+
next unless File.exist?(fname)
54+
next unless File.file?(fname)
55+
next unless fname =~ /^modules.+\.rb/
5556
files_to_check << fname
5657
end
5758

0 commit comments

Comments
 (0)