Files
sdk/pkg/dev_compiler/tool/analyze.sh
T
Vijay Menon 5dffba506e Use bleeding edge analyzer to analyze DDC
Note, we were getting this from building the SDK from scratch, but we
can just call it directly. :-)

Travis try-run here:

https://travis-ci.org/dart-lang/sdk/builds/197045751

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2669623002 .
2017-01-31 12:05:37 -08:00

751 B
Executable File

#!/bin/bash
set -e
 
# Switch to the root directory of dev_compiler
cd $( dirname "${BASH_SOURCE[0]}" )/..
 
function fail {
echo -e "Analyzer found problems"
return 1
}
 
# Run analyzer on bin/dartdevc.dart, as it includes most of the code we care
# about via transitive dependencies. This seems to be the only fast way to avoid
# repeated analysis of the same code.
# TODO(jmesserly): ideally we could do test/all_tests.dart, but
# dart_runtime_test.dart creates invalid generic type instantiation AA.
echo "Running dartanalyzer to check for errors/warnings..."
dart ../analyzer_cli/bin/analyzer.dart --strong --package-warnings \
bin/dartdevc.dart web/main.dart \
| grep -v "\[info\]" | grep -v "\[hint\]" | (! grep $PWD) || fail