diff options
Diffstat (limited to '.arc-linters')
-rwxr-xr-x | .arc-linters/check-cpp.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/.arc-linters/check-cpp.py b/.arc-linters/check-cpp.py index 2f32f9be6a..52961e6edd 100755 --- a/.arc-linters/check-cpp.py +++ b/.arc-linters/check-cpp.py @@ -6,6 +6,7 @@ import sys import logging import os +import re import json def setup_logging(logger): @@ -24,10 +25,11 @@ logger.debug(sys.argv) path = sys.argv[1] warnings = [] +r = re.compile(r'ASSERT\s+\(') if os.path.isfile(path): with open(path) as f: for lineno, line in enumerate(f): - if 'ASSERT (' in line: + if r.search(line): warning = { 'severity': 'warning', 'message': 'CPP macros should not have a space between the macro name and their argument list', |