Skip to content

Commit 55aae54

Browse files
committed
lint
1 parent bfc482f commit 55aae54

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

script/tool/lib/src/publish_command.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ class PublishCommand extends PackageLoopingCommand {
212212
if (!ciConfigFile.existsSync()) {
213213
isBatchReleasePackage = false;
214214
} else {
215-
final YamlMap? ciConfig =
215+
final ciConfig =
216216
loadYaml(ciConfigFile.readAsStringSync()) as YamlMap?;
217-
final dynamic batchValue = ciConfig?['release']?['batch'];
217+
final dynamic batchValue = (ciConfig?['release'] as YamlMap? )?['batch'];
218218
if (batchValue is! bool) {
219219
printError(
220220
'`release.batch` key is missing or not a boolean in ci_config.yaml for $packageName.');

script/tool/test/util.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ RepositoryPackage createFakePlugin(
118118
flutterConstraint: flutterConstraint,
119119
dartConstraint: dartConstraint,
120120
);
121-
if(batchRelease != null){
121+
if (batchRelease != null) {
122122
createFakeCiConfig(batchRelease, package);
123123
}
124124

@@ -292,18 +292,15 @@ $pluginSection
292292
}
293293

294294
/// Creates a `ci_config.yaml` file for [package].
295-
void createFakeCiConfig(
296-
bool batchRelease,
297-
RepositoryPackage package,
298-
){
299-
final String yaml = '''
295+
void createFakeCiConfig(bool batchRelease, RepositoryPackage package) {
296+
final yaml =
297+
'''
300298
release:
301299
batch: $batchRelease
302300
''';
303301

304302
package.ciConfigFile.createSync();
305303
package.ciConfigFile.writeAsStringSync(yaml);
306-
307304
}
308305

309306
String _pluginPlatformSection(

0 commit comments

Comments
 (0)