这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix analysis script to run from anywhere #86683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 26, 2021

Conversation

gspencergoog
Copy link
Contributor

Description

Fixes a small problem with the analyze.dart script that fixes it so that it can be invoked from any directory, not just the Flutter root.

Tests

  • Added a test for the localizations test, since there wasn't one (which is why this bug appeared).

@gspencergoog gspencergoog requested a review from craiglabenz July 19, 2021 22:05
@flutter-dashboard flutter-dashboard bot added f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Jul 19, 2021
@google-cla google-cla bot added the cla: yes label Jul 19, 2021
@gspencergoog gspencergoog force-pushed the analyze_from_anywhere branch from c21fc3a to 96f2d20 Compare July 19, 2021 22:31
Copy link
Contributor

@craiglabenz craiglabenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified by running the analysis script from within the repo, so this LGTM

@craiglabenz
Copy link
Contributor

Oh goodie, a Windows-only error.

@gspencergoog gspencergoog force-pushed the analyze_from_anywhere branch from 96f2d20 to f6acf9f Compare July 20, 2021 00:33
print('Expected output $type');
}
''');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: newlines at EOF here and below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks.

@gspencergoog gspencergoog force-pushed the analyze_from_anywhere branch from f6acf9f to 0b2e8b5 Compare July 20, 2021 21:42
@gspencergoog gspencergoog force-pushed the analyze_from_anywhere branch from 0b2e8b5 to 1f1f64d Compare July 21, 2021 00:19
@@ -38,7 +38,8 @@ Future<String> capture(AsyncVoidCallback callback, { int exitCode = 0 }) async {

void main() {
final String testRootPath = path.join('test', 'analyze-test-input', 'root');
final String dartPath = path.canonicalize(path.join('..', '..', 'bin', 'cache', 'dart-sdk', 'bin', Platform.isWindows ? 'dart.exe' : 'dart'));
final String dartName = Platform.isWindows ? 'dart.exe' : 'dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the .exe extension on Windows always trips me up 😆

@gspencergoog gspencergoog merged commit 57224f8 into flutter:master Jul 26, 2021
@gspencergoog gspencergoog deleted the analyze_from_anywhere branch July 26, 2021 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: contributor-productivity Team-specific productivity, code health, technical debt. f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants