What happens
dart format . on a current Dart SDK rewrites one file that nobody is editing:
$ dart --version
Dart SDK version: 3.12.2 (stable) ... on "linux_x64"
$ dart format .
Formatted lib/src/slack.dart
Formatted 91 files (1 changed) in 0.30 seconds.
The change is only the trailing ; placement after the last enum value:
/// Insert the content before the existing body.
- prepend('insert_at_start')
- ;
+ prepend('insert_at_start');
const CanvasEditMode(this.operation);
Why it matters
CI pins the SDK and runs the formatter as a hard gate:
.github/workflows/dart_slack.yaml:38 — sdk: "3.10.0"
.github/workflows/dart_slack.yaml:44 — dart format --set-exit-if-changed .
So the gate passes today only because of the pinned version. Two consequences:
- Anyone with a newer local SDK who runs
dart format . before committing picks up an unrelated one-file diff. It is easy to commit by accident and it makes a scoped pull request look wider than it is.
- When the pin is raised,
dart format --set-exit-if-changed . turns red on a file the SDK bump does not otherwise touch. The failure will look like it belongs to whichever pull request raises the pin.
Acceptance criteria
dart format . reports no changes on the pinned SDK AND on the current stable SDK.
- CI is unchanged in behaviour:
dart format --set-exit-if-changed . still passes.
Suggested fix
Apply the formatter's output to lib/src/slack.dart in one commit of its own. The pinned 3.10.0 formatter must also accept that spelling — verify on 3.10.0 before merging, because the point of the change is to satisfy both.
How this was found
Reviewing feedback on #36. @kumar-waaf asked for a documentation fix there; running dart format produced this unrelated file change. I reverted it to keep #36 scoped, and filed it here rather than including it silently.
What happens
dart format .on a current Dart SDK rewrites one file that nobody is editing:The change is only the trailing
;placement after the last enum value:Why it matters
CI pins the SDK and runs the formatter as a hard gate:
.github/workflows/dart_slack.yaml:38—sdk: "3.10.0".github/workflows/dart_slack.yaml:44—dart format --set-exit-if-changed .So the gate passes today only because of the pinned version. Two consequences:
dart format .before committing picks up an unrelated one-file diff. It is easy to commit by accident and it makes a scoped pull request look wider than it is.dart format --set-exit-if-changed .turns red on a file the SDK bump does not otherwise touch. The failure will look like it belongs to whichever pull request raises the pin.Acceptance criteria
dart format .reports no changes on the pinned SDK AND on the current stable SDK.dart format --set-exit-if-changed .still passes.Suggested fix
Apply the formatter's output to
lib/src/slack.dartin one commit of its own. The pinned 3.10.0 formatter must also accept that spelling — verify on 3.10.0 before merging, because the point of the change is to satisfy both.How this was found
Reviewing feedback on #36. @kumar-waaf asked for a documentation fix there; running
dart formatproduced this unrelated file change. I reverted it to keep #36 scoped, and filed it here rather than including it silently.