diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2018-10-29 15:52:01 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-10-31 17:12:18 +0000 |
commit | 4712e59d75bb95cb206aff4a6bc111c7c79b06a5 (patch) | |
tree | c0ccf280efee3690c6fdc347d57140183042bd13 /git-hooks | |
parent | ddd8ad86da7790ce83640814ee5f1528c4df1fbe (diff) |
Don't check spacing in test-data
We have a general convention of storing test data in testdata/
sub-directories alongside their tests. This data is whatever it needs
to be, for whatever the test may be doing, so we don't want to waste
cycles commenting on its spacing, or spam reviewers with the results.
Adding this exception might even encourage those maintaining tests
with such data to adopt this (already common) convention and make it
easier for others who encounter tests to know where to find their
data. (I'll start with testlib's selftest's expected_* data when I
can find the time.)
Change-Id: Ib27b75e858e0573a65540787f4ccae6b2383bc3d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'git-hooks')
-rwxr-xr-x | git-hooks/sanitize-commit | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index 4dd3f3c..515e49b 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -696,6 +696,8 @@ while (<DIFF>) { if ($file =~ /(~|\.(old|bak))$/i) { complain("Adding backup file", "backup") if ($new_file && !defined($cfg{backup})); $ws_check = 0; + } elsif ($file =~ m,^tests/.*/testdata/,) { + $ws_check = 0; } elsif ($file =~ /\.(prl|la|pc|ilk)$/i) { complain("Adding build artifact", "generated") if ($new_file && !defined($cfg{generated})); $ws_check = 0; |