This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 7272 - cd script/tool
7373 - dart analyze --fatal-infos
7474 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.
7577 - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
7678 # ## Android tasks ###
7779 - name : build_all_plugins_apk
Original file line number Diff line number Diff line change 88# from a top-level package into more specific packages in order to incrementally
99# migrate a federated plugin.
1010#
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+
1116# TODO(ecosystem): Remove everything from this list. See:
1217# https://github.com/flutter/flutter/issues/76229
1318- camera
Original file line number Diff line number Diff line change @@ -251,4 +251,43 @@ void main() {
251251 ]),
252252 );
253253 });
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+ });
254293}
You can’t perform that action at this time.
0 commit comments