Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 19efacc

Browse files
Enable analysis for the tool directory (flutter#3853)
Since the tooling doesn't live in packages/, we're not currently analyzing it. This enables analysis so that we won't have analyzer issues creeping in over time. To minimize complexity, this just adds it directly to the Cirrus configuration rather than building knowledge of the tool directory into the tool itself.
1 parent d763b2c commit 19efacc

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.cirrus.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ task:
5757
- name: format
5858
format_script: ./script/incremental_build.sh format --fail-on-change
5959
license_script:
60-
- cd script/tool
61-
- pub get
62-
- cd ../..
6360
- dart script/tool/lib/src/main.dart license-check
6461
- name: test
6562
env:
@@ -72,7 +69,10 @@ task:
7269
env:
7370
matrix:
7471
CHANNEL: "master"
75-
script:
72+
tool_script:
73+
- cd script/tool
74+
- dart analyze --fatal-infos
75+
plugins_script:
7676
- ./script/incremental_build.sh analyze
7777
## TODO(cyanglaz):
7878
## Combing stable and master analyze jobs when integration test null safety is ready on flutter stable.

script/tool/lib/src/drive_examples_command.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ class DriveExamplesCommand extends PluginCommand {
101101
fileSystem.directory(p.join(example.path, 'integration_test'));
102102

103103
if (await integrationTests.exists()) {
104-
await for (final FileSystemEntity integration_test
104+
await for (final FileSystemEntity integrationTest
105105
in integrationTests.list()) {
106-
if (!integration_test.basename.endsWith('_test.dart')) {
106+
if (!integrationTest.basename.endsWith('_test.dart')) {
107107
continue;
108108
}
109109
targetPaths
110-
.add(p.relative(integration_test.path, from: example.path));
110+
.add(p.relative(integrationTest.path, from: example.path));
111111
}
112112
}
113113

script/tool/lib/src/version_check_command.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class VersionCheckCommand extends PluginCommand {
187187

188188
// Skip validation for the special NEXT version that's used to accumulate
189189
// changes that don't warrant publishing on their own.
190-
bool hasNextSection = versionString == 'NEXT';
190+
final bool hasNextSection = versionString == 'NEXT';
191191
if (hasNextSection) {
192192
print('Found NEXT; validating next version in the CHANGELOG.');
193193
// Ensure that the version in pubspec hasn't changed without updating

0 commit comments

Comments
 (0)