tools/bump: reformat inside the lock bump

gateFlake judges the formatting check right after the lock moves, but the
fmt area runs last, so the new toolchain's formatting had not been applied
yet and the flake area dropped itself every run.
This commit is contained in:
Kristoffer Dalby
2026-09-09 18:33:21 +00:00
parent 8d89742a21
commit f1186d8e00
2 changed files with 25 additions and 7 deletions
+9
View File
@@ -88,6 +88,15 @@ func applyFlake(ctx context.Context, r *repo) (change, error) {
return change{Empty: true}, nil
}
// The lock decides which prettier, gofumpt and nixfmt the tree is judged
// by, so moving it can leave files no bump touched failing the formatting
// check. Reformatting belongs in this commit rather than a later one: the
// gate below judges this tree, and the cause is this change.
err = runFormatters(ctx, r)
if err != nil {
return change{}, err
}
detail := moved
if tools, err := toolVersions(ctx, r); err == nil { //nolint:noinlineerr