summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-04-26 15:43:26 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-04-27 16:04:53 +0000
commitbfbc2828b872b5cc696d1c9fadf965fb0e8e3dc8 (patch)
treeb19a241cb252d9a868b5f89b649b6bc88d81dcfa
parent91471704ad8d97bb1d16077e160f23eec45738d3 (diff)
Teach sanitize-commit not to grumble about tabs in *.mk files
The suffix .mk is commonly used for non-primary make-files (such as are invoked with make -f or pulled in by make's include directive). Complaining about leading tabs in Makefile is already avoided, so do the same for *.mk files. Change-Id: Iceff9f65ccdcc716babb8c738dd1d6141e08ea2a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rwxr-xr-xgit-hooks/sanitize-commit3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index 6d365cb..f455c42 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -775,7 +775,8 @@ while (<DIFF>) {
$mixws_check = !$merge && !$foreign && $clike && !defined($cfg{mixws});
$ws_check = !defined($cfg{style}) && !$foreign && ($file !~ /\.(ts|diff|patch)$|^\.gitmodules$/);
$tsv_check = $ws_check && ($file =~ /((^|\/)objects\.map$|\.tsv$)/);
- $tabs_check = $ws_check && !$tsv_check && !defined($cfg{tabs}) && ($file !~ /((^|\/)Makefile\b|debian[.\/]rules|\.(pbxproj|plist(\.[^.\/]+)?|def|spec|changes|[xn]ib|storyboardc?|go|svg)(?:\.in)?$)/);
+ $tabs_check = $ws_check && !$tsv_check && !defined($cfg{tabs})
+ && ($file !~ /((^|\/)Makefile\b|debian[.\/]rules|\.(pbxproj|plist(\.[^.\/]+)?|def|mk|spec|changes|[xn]ib|storyboardc?|go|svg)(?:\.in)?$)/);
$allow_2spaces = $ws_check && ($file =~ /\.md$/);
$ctlkw_check = $tabs_check && $clike;
$eof_check = !$is_bin && ($file !~ /(\.plist(\.[^.\/]+)?|\.xcassets\/.*\.json)$/); # Xcode consistently forgets the trailing newline