fix: emit lint diff in conventional got→want direction#230
Open
cyphermox wants to merge 1 commit into
Open
Conversation
ExecDiff ran `diff want got` with labels `--- want` / `+++ got`, so the printed diff described how to turn the correctly-formatted file into the current (unformatted) one. That is the inverse of the convention used by `gofmt -d`, `prettier` and `black --diff`, where the diff goes from the current file to the expected output and can be applied directly as a patch to fix formatting. Swap the operands and labels so the output is `--- got` / `+++ want`: removed lines are the current contents, added lines are the fix. No behavioral change to formatting or lint pass/fail; only the direction and labels of the informational diff. lint_test.go asserts on the returned error only, so existing tests are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
stevebeattie
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ExecDiff ran
diff want gotwith labels--- want/+++ got, so the printed diff described how to turn the correctly-formatted file into the current (unformatted) one. That is the inverse of the convention used bygofmt -d,prettierandblack --diff, where the diff goes from the current file to the expected output and can be applied directly as a patch to fix formatting.Swap the operands and labels so the output is
--- got/+++ want: removed lines are the current contents, added lines are the fix.No behavioral change to formatting or lint pass/fail; only the direction and labels of the informational diff. lint_test.go asserts on the returned error only, so existing tests are unaffected.