summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/linters/check-cpp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/.gitlab/linters/check-cpp.py b/.gitlab/linters/check-cpp.py
index c89451399e..c51c127379 100755
--- a/.gitlab/linters/check-cpp.py
+++ b/.gitlab/linters/check-cpp.py
@@ -3,6 +3,7 @@
# A linter to warn for ASSERT macros which are separated from their argument
# list by a space, which Clang's CPP barfs on
+from pathlib import Path
from linter import run_linters, RegexpLinter
linters = [
@@ -20,5 +21,11 @@ linters = [
message='`#if !defined(x)` is preferred to `#ifndef x`'),
]
+for l in linters:
+ # Need do document rules!
+ l.add_path_filter(lambda path: path != Path('docs', 'coding-style.html'))
+ # Don't lint vendored code
+ l.add_path_filter(lambda path: not path.name == 'config.guess')
+
if __name__ == '__main__':
run_linters(linters)