Repository navigation
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.
Milestone
Description
Go version
go version go1.26.1 darwin/arm64
Output of go env in your module/workspace:
not relevantWhat did you do?
This is really a "nit" 🙈 and maybe it was by design but I noticed it when updating some of my examples; it looks like go fix and go fix -diff are inconsistent and report the exact reverse of changed made.
Feel free to close this one if this was by design! ❤️ - if it was not by design, I'm happy to look at contributing a change 👍
Without -diff, go fix reports the number of fixes applied:
fix: applied 2 of 3 fixes; 1 file updated. (Re-run the command to apply more.)With -diff, go fix reports the number of fixes skipped;
fix: 1 of 3 fixes skipped (e.g. due to conflicts)What did you see happen?
With -diff:
go fix -mod=readonly -diff ./... > /dev/null
# example.com/f
# [example.com/f]
fix: 1 of 3 fixes skipped (e.g. due to conflicts)
# example.com/g
# [example.com/g]
fix: 1 of 3 fixes skipped (e.g. due to conflicts)
# example.com/h
# [example.com/h]
fix: 1 of 2 fixes skipped (e.g. due to conflicts)
# example.com/i
# [example.com/i]
fix: 2 of 3 fixes skipped (e.g. due to conflicts)
# example.com/j
# [example.com/j]
fix: 2 of 3 fixes skipped (e.g. due to conflicts)
# example.com/k_test
# [example.com/k_test]
fix: 1 of 2 fixes skipped (e.g. due to conflicts)Running the same without -diff reports the exact reverse;
go fix -mod=readonly ./...
# example.com/f
# [example.com/f]
fix: applied 2 of 3 fixes; 1 file updated. (Re-run the command to apply more.)
# example.com/g
# [example.com/g]
fix: applied 2 of 3 fixes; 2 files updated. (Re-run the command to apply more.)
# example.com/h
# [example.com/h]
fix: applied 1 of 2 fixes; 1 file updated. (Re-run the command to apply more.)
# example.com/i
# [example.com/i]
fix: applied 1 of 3 fixes; 1 file updated. (Re-run the command to apply more.)
# example.com/j
# [example.com/j]
fix: applied 1 of 3 fixes; 1 file updated. (Re-run the command to apply more.)
# example.com/k_test
# [example.com/k_test]
fix: applied 1 of 2 fixes; 1 file updated. (Re-run the command to apply more.)What did you expect to see?
Both to report the same 😅 - perhaps a combination of the two ("applied X fixes" is a more positive message and "re-run the command" makes it (potentially) actionable); something like...
fix: 1 file updated: applied 2 of 3 fixes, skipped 1 (e.g., due to conflicts); re-run the command to apply more.Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.
Activity
gabyhelp commentedon Mar 15, 2026
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
thediveo commentedon Mar 15, 2026
I would really want to see the reasons why fixes were skipped if any, instead of a number and a comment straight off an LLM.
thaJeztah commentedon Mar 15, 2026
@thediveo you mean why my example failed? Or did you mean "I would like the messages printed by
go fixto include the reason"? 😅If it's because you were curious what example produced it; this was related to #78164 and #78165 (78164 has an example module uploaded as attachment if you want to try it) 😅
thediveo commentedon Mar 15, 2026
Actually both, but I don't want to sideload the issue.