This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree 3 files changed +46
-0
lines changed
3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 72
72
- cd script/tool
73
73
- dart analyze --fatal-infos
74
74
script :
75
+ # DO NOT change the custom-analysis argument here without changing the Dart repo.
76
+ # See the comment in script/configs/custom_analysis.yaml for details.
75
77
- ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
76
78
# ## Android tasks ###
77
79
- name : build_all_plugins_apk
Original file line number Diff line number Diff line change 8
8
# from a top-level package into more specific packages in order to incrementally
9
9
# migrate a federated plugin.
10
10
#
11
+ # DO NOT move or delete this file without updating
12
+ # https://github.com/dart-lang/sdk/blob/master/tools/bots/flutter/analyze_flutter_plugins.sh
13
+ # which references this file from source, but out-of-repo.
14
+ # Contact stuartmorgan or devoncarew for assistance if necessary.
15
+
11
16
# TODO(ecosystem): Remove everything from this list. See:
12
17
# https://github.com/flutter/flutter/issues/76229
13
18
- camera
Original file line number Diff line number Diff line change @@ -251,4 +251,43 @@ void main() {
251
251
]),
252
252
);
253
253
});
254
+
255
+ // Ensure that the command used to analyze flutter/plugins in the Dart repo:
256
+ // https://github.com/dart-lang/sdk/blob/master/tools/bots/flutter/analyze_flutter_plugins.sh
257
+ // continues to work.
258
+ //
259
+ // DO NOT remove or modify this test without a coordination plan in place to
260
+ // modify the script above, as it is run from source, but out-of-repo.
261
+ // Contact stuartmorgan or devoncarew for assistance.
262
+ test ('Dart repo analyze command works' , () async {
263
+ final Directory pluginDir = createFakePlugin ('foo' , packagesDir,
264
+ extraFiles: < String > ['analysis_options.yaml' ]);
265
+ final File allowFile = packagesDir.childFile ('custom.yaml' );
266
+ allowFile.writeAsStringSync ('- foo' );
267
+
268
+ await runCapturingPrint (runner, < String > [
269
+ // DO NOT change this call; see comment above.
270
+ 'analyze' ,
271
+ '--analysis-sdk' ,
272
+ 'foo/bar/baz' ,
273
+ '--custom-analysis' ,
274
+ allowFile.path
275
+ ]);
276
+
277
+ expect (
278
+ processRunner.recordedCalls,
279
+ orderedEquals (< ProcessCall > [
280
+ ProcessCall (
281
+ 'flutter' ,
282
+ const < String > ['packages' , 'get' ],
283
+ pluginDir.path,
284
+ ),
285
+ ProcessCall (
286
+ 'foo/bar/baz/bin/dart' ,
287
+ const < String > ['analyze' , '--fatal-infos' ],
288
+ pluginDir.path,
289
+ ),
290
+ ]),
291
+ );
292
+ });
254
293
}
You can’t perform that action at this time.
0 commit comments