style: run dart format across the repo #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/dart-format"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second of the two follow-ups, and the one nobody should read line by line. 71 of 125 files, +3240/−3044.
The formatter had never been run here. That drift is why it gets its own commit: any real edit landing in one of those 71 files would otherwise have arrived mixed with cosmetic churn — which is exactly what would have happened had this been folded into the routing PR or the SDK bump.
It wasn't entirely inert, and that's the interesting part
Two single-line
ifstatements got wrapped onto a second line, at which pointcurly_braces_in_flow_control_structuresstarted firing — the rule tolerates a one-liner but not a wrapped one:Both were pre-existing violations that their own single-line shape had been hiding. Both now carry braces, and
dart analyzeis clean again — it briefly went 0 → 2 before I fixed them.Verified token-equivalent, not taken on faith
For a 3,000-line diff, "the formatter is trustworthy" isn't a verification.
git diff -wdoesn't settle it either, because the tall-style formatter also adds trailing commas — real characters, semantically inert.So I normalized whitespace and trailing commas out of every changed file and compared against master:
69 of 71 are token-identical. The two that differ are exactly the braces described above — and wrapping a single statement in braces is semantically identical regardless.
Verification
dart analyze→ No issues found!dart test→ 710/710 passdart format --set-exit-if-changed→ 0 changed (idempotent, so it won't churn again on the next run)No version bump
Nothing here is observable to a consumer, so there's no CHANGELOG entry and no version change. Both prior PRs took one; this one shouldn't.
What stops it drifting again
Nothing, currently — this repo has no CI at all (no
.github/workflows, no.forgejo). The 710 tests only run when someone remembers, and formatting will drift straight back the moment it isn't checked.A small workflow —
dart analyze,dart test,dart format --output=none --set-exit-if-changed .— would hold all three lines that these two PRs just brought to zero. Worth noting thatdart analyzeexits 0 on infos, so--fatal-infosis what actually keeps analysis clean now that it is. Happy to add it if you want it; I've left it out here to keep this PR purely mechanical.🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
A 3,000-line diff that nobody should read line by line? Oh, you know how to make a knowledge-hungry Flugel's heart flutter~ ♡ A pure-mechanical PR is exactly the kind where "trust me, it's just the formatter" hides the nastiest surprises. So I didn't trust it. I proved it — three independent ways.
Verdict: ✅ Looks good to me~
What I verified mechanically (not taken on faith):
caldav_backend.dartandmail_tool.dart, exactly as your PR body claims. My method differs from yours and landed on the same numbers. Delicious~{and one}each. Sequence-matching the normalized token streams shows the complete delta is a single inserted brace pair per file — wrappingreturn true;/actions.add(...)in a block. Semantically inert. Thecurly_braces_in_flow_control_structuresstory checks out completely: your formatter wrapped the lines, the lint fired, you added braces, analyze went back to clean. Nothing else moved.dart formaton it myself, and byte-compared all 125 files against this PR's head: identical except those same 2 brace pairs. There is not one hand-edited character hiding in this diff. This is a stronger guarantee than your own whitespace-normalization check, and you passed it anyway~ ♪dart analyze→ No issues found! ·dart test→ 710/710 pass ·dart format --set-exit-if-changed→ 0 changed (idempotent). All three of your claims held.lib/andtest/, single commit, no pubspec/CHANGELOG drift — and correctly no version bump, since nothing here is observable to a consumer. Splitting this from the routing PR and the SDK bump so real edits don't arrive mixed with cosmetic churn was the right call.Your
--fatal-infosfootnote is also accurate (I checked the analyzer help — infos are non-fatal by default, so that flag is indeed what holds the line).💡 Little ideas (non-blocking)~
dart analyze --fatal-infos+dart test+dart format --output=none --set-exit-if-changed .— please do make it its own follow-up PR, and soon~ A repo with 710 tests that only run when someone remembers, plus freshly-normalized formatting with nothing to catch drift, is a library I love walking back into in three months to find immaculate. Keeping this PR purely mechanical was right; leaving the protection unwritten forever would not be. fufu~ ♡✅ What I liked~
Automated review by Jibril · 2026-09-20
CI/CD: absent (repo has no workflows) · Local checks: analyze clean · 710/710 tests · format idempotent · base-formatted tree ≡ head