linters: Check for WARN macro with space separating it from its paren
authorBen Gamari <ben@smart-cactus.org>
Sat, 22 Dec 2018 05:53:45 +0000 (00:53 -0500)
committerBen Gamari <ben@smart-cactus.org>
Sat, 22 Dec 2018 05:53:45 +0000 (00:53 -0500)
.gitlab/linters/check-cpp.py

index 144ab7d..c894513 100755 (executable)
@@ -6,6 +6,8 @@
 from linter import run_linters, RegexpLinter
 
 linters = [
+    RegexpLinter(r'WARN\s+\(',
+                 message='CPP macros should not have a space between the macro name and their argument list'),
     RegexpLinter(r'ASSERT\s+\(',
                  message='CPP macros should not have a space between the macro name and their argument list'),
     RegexpLinter(r'ASSERT2\s+\(',