Skip to content

Commit 891ada0

Browse files
agordn52claude
andcommitted
fix(ci): check formatting instead of auto-format in publish workflow
The workflow was running `dart format .` which modified files and made the working tree dirty before `dart pub publish`, causing publish failures. Changed to `dart format --output=none --set-exit-if-changed .` which checks formatting without modifying files. Also formatted the 2 files that were causing the issue. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3bd9238 commit 891ada0

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
- name: Analyze code
2525
run: flutter analyze
2626

27-
- name: Format code
28-
run: dart format .
27+
- name: Check code formatting
28+
run: dart format --output=none --set-exit-if-changed .
2929

3030
- name: Check publish warnings
3131
run: flutter pub publish --dry-run

lib/src/commands/new_command.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ class NewCommand {
188188

189189
if (await pbxprojFile.exists()) {
190190
String content = await pbxprojFile.readAsString();
191-
content =
192-
content.replaceAll('com.nylo.ios', 'com.$projectName.ios');
191+
content = content.replaceAll('com.nylo.ios', 'com.$projectName.ios');
193192
await pbxprojFile.writeAsString(content);
194193
}
195194
}

test/console_test.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ void main() {
5353
});
5454

5555
test('writeTaskHeader should not throw', () {
56-
expect(
57-
() => NyloConsole.writeTaskHeader('Creating project'), returnsNormally);
56+
expect(() => NyloConsole.writeTaskHeader('Creating project'),
57+
returnsNormally);
5858
});
5959

6060
test('writeSubtaskPending should not throw', () {
61-
expect(
62-
() => NyloConsole.writeSubtaskPending('Checking...'), returnsNormally);
61+
expect(() => NyloConsole.writeSubtaskPending('Checking...'),
62+
returnsNormally);
6363
});
6464

6565
test('writeSubtaskPending with isFirst should not throw', () {
@@ -69,8 +69,7 @@ void main() {
6969
});
7070

7171
test('writeSubtaskComplete should not throw', () {
72-
expect(
73-
() => NyloConsole.writeSubtaskComplete('Done'), returnsNormally);
72+
expect(() => NyloConsole.writeSubtaskComplete('Done'), returnsNormally);
7473
});
7574
});
7675

0 commit comments

Comments
 (0)