Index: tools/presubmit.py |
diff --git a/tools/presubmit.py b/tools/presubmit.py |
index 32ad334a0aec8e5a7938e4298aaf88b78be0753e..a835e61792caad2f6858412c2263e0ce78fc2877 100755 |
--- a/tools/presubmit.py |
+++ b/tools/presubmit.py |
@@ -103,7 +103,7 @@ whitespace/todo |
# TODO(bmeurer): Fix and re-enable readability/check |
LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing') |
- |
+FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n") |
def CppLintWorker(command): |
try: |
@@ -414,6 +414,12 @@ class SourceProcessor(SourceFileProcessor): |
print "%s does not have two empty lines between declarations " \ |
"in line %s." % (name, linenumbers) |
result = False |
+ # Sanitize flags for fuzzer. |
+ if "mjsunit" in name: |
+ match = FLAGS_LINE.search(contents) |
+ if match: |
+ print "%s Flags should use '-' (not '_')" % name |
+ result = False |
return result |
def ProcessFiles(self, files, path): |