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

Unified Diff: mojo/public/tools/dart_analyze.py

Issue 998693004: Enable dartanalyze warnings. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: zra comments Created 5 years, 9 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 | « mojo/public/dart/src/proxy.dart ('k') | services/dart/dart_apptests/echo_apptests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/dart_analyze.py
diff --git a/mojo/public/tools/dart_analyze.py b/mojo/public/tools/dart_analyze.py
index 5de680c0411c9f2887707d25d7449dc8d42b7fd8..807c24b6aab40e342ecbf2c98e00c7c943868326 100755
--- a/mojo/public/tools/dart_analyze.py
+++ b/mojo/public/tools/dart_analyze.py
@@ -20,14 +20,14 @@ import tempfile
import zipfile
_ANALYZING_PATTERN = re.compile(r'^Analyzing \[')
-_FINAL_REPORT_PATTERN = re.compile(r'^[0-9]+ errors and [0-9]+ warnings found.')
+_ERRORS_AND_WARNINGS_PATTERN = re.compile(
+ r'^[0-9]+ errors? and [0-9]+ warnings? found.')
+_ERRORS_PATTERN = re.compile(r'^[0-9]+ errors? found.')
+_WARNINGS_PATTERN = re.compile(r'^[0-9]+ warnings? found.')
_NATIVE_ERROR_PATTERN = re.compile(
r'^\[error\] Native functions can only be declared in the SDK and code that '
r'is loaded through native extensions')
-_WARNING_PATTERN = re.compile(r'^\[warning\]')
-_THAT_ONE_BROKEN_CLOSE_IN_WEB_SOCKETS_PATTERN = re.compile(
- r'^\[error\] The name \'close\' is already defined')
def main(args):
@@ -63,11 +63,11 @@ def main(args):
raw_lines.pop()
filtered_lines = [i for i in raw_lines if (
not re.match(_ANALYZING_PATTERN, i) and
- not re.match(_FINAL_REPORT_PATTERN, i) and
+ not re.match(_ERRORS_AND_WARNINGS_PATTERN, i) and
+ not re.match(_ERRORS_PATTERN, i) and
+ not re.match(_WARNINGS_PATTERN, i) and
# TODO(erg): Remove the rest of these as fixes land:
- not re.match(_WARNING_PATTERN, i) and
- not re.match(_NATIVE_ERROR_PATTERN, i) and
- not re.match(_THAT_ONE_BROKEN_CLOSE_IN_WEB_SOCKETS_PATTERN, i))]
+ not re.match(_NATIVE_ERROR_PATTERN, i))]
for line in filtered_lines:
passed = False
print >> sys.stderr, line.replace(temp_dir + "/", dartzip_basename)
« no previous file with comments | « mojo/public/dart/src/proxy.dart ('k') | services/dart/dart_apptests/echo_apptests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698