Skip to content

Commit 4bd5bb6

Browse files
committed
dartfmt
1 parent 39be234 commit 4bd5bb6

File tree

5 files changed

+33
-12
lines changed

5 files changed

+33
-12
lines changed

sidekick_core/lib/src/commands/plugins/create_templates/install_only.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ class InstallOnlyTemplate extends PluginTemplateGenerator {
1313
@override
1414
void generate(PluginTemplateProperties props) {
1515
final pluginDirectory = props.pluginDirectory;
16-
pluginDirectory.file('pubspec.yaml').writeAsStringSync(props.pubspecTemplate);
16+
pluginDirectory
17+
.file('pubspec.yaml')
18+
.writeAsStringSync(props.pubspecTemplate);
1719

1820
final toolDirectory = pluginDirectory.directory('tool')..createSync();
1921
toolDirectory.file('install.dart').writeAsStringSync(props.installTemplate);

sidekick_core/lib/src/commands/plugins/create_templates/shared_code.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,20 @@ class SharedCodeTemplate extends PluginTemplateGenerator {
1515
void generate(PluginTemplateProperties props) {
1616
final pluginDirectory = props.pluginDirectory;
1717

18-
pluginDirectory.file('pubspec.yaml').writeAsStringSync(props.pubspecTemplate);
18+
pluginDirectory
19+
.file('pubspec.yaml')
20+
.writeAsStringSync(props.pubspecTemplate);
1921

2022
final toolDirectory = pluginDirectory.directory('tool')..createSync();
2123
toolDirectory.file('install.dart').writeAsStringSync(props.installTemplate);
2224

2325
final libDirectory = pluginDirectory.directory('lib')..createSync();
24-
libDirectory.file('${props.pluginName.snakeCase}.dart').writeAsStringSync(props.helpers);
26+
libDirectory
27+
.file('${props.pluginName.snakeCase}.dart')
28+
.writeAsStringSync(props.helpers);
2529

26-
final templateDirectory = pluginDirectory.directory('template')..createSync();
30+
final templateDirectory = pluginDirectory.directory('template')
31+
..createSync();
2732
final pluginCommandTemplateFile = templateDirectory
2833
.file('commands/${props.commandName.snakeCase}_command.template.dart')
2934
..createSync(recursive: true);

sidekick_core/lib/src/commands/plugins/create_templates/shared_command.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ class SharedCommandTemplate extends PluginTemplateGenerator {
1515
@override
1616
void generate(PluginTemplateProperties props) {
1717
final pluginDirectory = props.pluginDirectory;
18-
pluginDirectory.file('pubspec.yaml').writeAsStringSync(props.pubspecTemplate);
18+
pluginDirectory
19+
.file('pubspec.yaml')
20+
.writeAsStringSync(props.pubspecTemplate);
1921

2022
final toolDirectory = pluginDirectory.directory('tool')..createSync();
2123
toolDirectory.file('install.dart').writeAsStringSync(props.installTemplate);
2224

2325
final libDirectory = pluginDirectory.directory('lib')..createSync();
24-
libDirectory.file('${props.pluginName.snakeCase}.dart').writeAsStringSync(props.library);
26+
libDirectory
27+
.file('${props.pluginName.snakeCase}.dart')
28+
.writeAsStringSync(props.library);
2529

2630
final srcDir = libDirectory.directory('src')..createSync();
27-
final commandFile = srcDir.file('commands/${props.commandName.snakeCase}_command.dart');
31+
final commandFile =
32+
srcDir.file('commands/${props.commandName.snakeCase}_command.dart');
2833
commandFile
2934
..createSync(recursive: true)
3035
..writeAsStringSync(props.exampleCommand);

sidekick_core/lib/src/template/sidekick_package.template.dart

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,22 @@ class SidekickTemplate {
4343
props.packageLocation.file('.gitignore')
4444
..createSync(recursive: true)
4545
..writeAsStringSync(_gitignore);
46-
props.packageLocation.file('pubspec.yaml').writeAsStringSync(props.pubspecYaml);
47-
props.packageLocation.file('analysis_options.yaml').writeAsStringSync(_analysisOptionsYaml);
46+
props.packageLocation
47+
.file('pubspec.yaml')
48+
.writeAsStringSync(props.pubspecYaml);
49+
props.packageLocation
50+
.file('analysis_options.yaml')
51+
.writeAsStringSync(_analysisOptionsYaml);
4852

4953
props.packageLocation.file('bin/main.dart')
5054
..createSync(recursive: true)
5155
..writeAsStringSync(props.binMainDart());
5256
props.packageLocation.file('lib/src/commands/clean_command.dart')
5357
..createSync(recursive: true)
5458
..writeAsStringSync(props.cleanCommandDart());
55-
props.packageLocation.file('lib/${props.name.snakeCase}_sidekick.dart').writeAsStringSync(props.cliSidekickDart());
59+
props.packageLocation
60+
.file('lib/${props.name.snakeCase}_sidekick.dart')
61+
.writeAsStringSync(props.cliSidekickDart());
5662
}
5763
}
5864

@@ -172,7 +178,9 @@ class CleanCommand extends Command {
172178

173179
String get pubspecYaml {
174180
final canonicalizedVersion = version.canonicalizedVersion;
175-
final constraintRange = version.major > 0 ? '^$canonicalizedVersion' : "'>=$canonicalizedVersion <1.0.0'";
181+
final constraintRange = version.major > 0
182+
? '^$canonicalizedVersion'
183+
: "'>=$canonicalizedVersion <1.0.0'";
176184
return '''
177185
name: ${name.snakeCase}_sidekick
178186
description: Sidekick CLI for $name

sidekick_core/test/update_dcli_8_pubspec_manager_3_migration_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ dependencies:
9797
});
9898
});
9999

100-
test('updates both dependencies when both are present with old versions', () async {
100+
test('updates both dependencies when both are present with old versions',
101+
() async {
101102
await insideFakeProjectWithSidekick((dir) async {
102103
final pubspecFile = SidekickContext.sidekickPackage.pubspec;
103104

0 commit comments

Comments
 (0)