Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 9d1e673

Browse files
authored
Temporarily add travis/analyze.sh back for Chrome bot (#5961)
Until https://chromium-review.googlesource.com/c/chromium/tools/build/+/1164636 landed, we'll use this to unblock the Chrome bot.
1 parent 4386afd commit 9d1e673

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

travis/analyze.sh

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/bash
2+
echo "Analyzing dart:ui library..."
3+
RESULTS=`dartanalyzer \
4+
--options flutter/analysis_options.yaml \
5+
out/host_debug_unopt/gen/sky/bindings/dart_ui/ui.dart \
6+
2>&1 \
7+
| grep -v "Native functions can only be declared in the SDK and code that is loaded through native extensions" \
8+
| grep -Ev "The function '.+' (is not|isn't) used" \
9+
| grep -Ev "The top level variable '.+' isn't used" \
10+
| grep -Ev "Undefined name 'main'" \
11+
| grep -v "The library 'dart:_internal' is internal" \
12+
| grep -Ev "Unused import.+ui\.dart" \
13+
| grep -Ev "[0-9]+ errors.*found\." \
14+
| grep -Ev "Analyzing.+out/host_debug_unopt/gen/sky/bindings/dart_ui/ui\.dart"`
15+
16+
echo "$RESULTS"
17+
if [ -n "$RESULTS" ]; then
18+
echo "Failed."
19+
exit 1;
20+
fi
21+
22+
echo "Analyzing frontend_server..."
23+
RESULTS=`dartanalyzer \
24+
--packages=flutter/frontend_server/.packages \
25+
--options flutter/analysis_options.yaml \
26+
flutter/frontend_server \
27+
2>&1 \
28+
| grep -Ev "No issues found!" \
29+
| grep -Ev "Analyzing.+frontend_server"`
30+
echo "$RESULTS"
31+
if [ -n "$RESULTS" ]; then
32+
echo "Failed."
33+
exit 1;
34+
fi
35+
36+
echo "Analyzing flutter_kernel_transformers..."
37+
RESULTS=`dartanalyzer \
38+
--packages=flutter/flutter_kernel_transformers/.packages \
39+
--options flutter/analysis_options.yaml \
40+
flutter/flutter_kernel_transformers \
41+
2>&1 \
42+
| grep -Ev "No issues found!" \
43+
| grep -Ev "Analyzing.+flutter_kernel_transformers"`
44+
echo "$RESULTS"
45+
if [ -n "$RESULTS" ]; then
46+
echo "Failed."
47+
exit 1;
48+
fi
49+
50+
echo "Analyzing tools/licenses..."
51+
(cd flutter/tools/licenses && pub get)
52+
RESULTS=`dartanalyzer \
53+
--packages=flutter/tools/licenses/.packages \
54+
--options flutter/tools/licenses/analysis_options.yaml \
55+
flutter/tools/licenses \
56+
2>&1 \
57+
| grep -Ev "No issues found!" \
58+
| grep -Ev "Analyzing.+tools/licenses"`
59+
echo "$RESULTS"
60+
if [ -n "$RESULTS" ]; then
61+
echo "Failed."
62+
exit 1;
63+
fi

0 commit comments

Comments
 (0)