Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: tools/presubmit.py

Issue 1219723002: Ensure mjsunit tests use dashes not underscores in flags directives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove commented code om patch set 1. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regress/regress-regexp-codeflush.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « test/mjsunit/regress/regress-regexp-codeflush.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698