Repository navigation
refactor: streamline Makefile and add diff functionality with tests - #11
Merged
Merged
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit 8a2b0ea)Here are some key observations to aid the review process:
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
|
Persistent review updated to latest commit 8c4c517 |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
|
Persistent review updated to latest commit ac9ed4a |
Contributor
|
Persistent review updated to latest commit b51bdf6 |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
Contributor
|
Persistent review updated to latest commit 8a2b0ea |
Contributor
PR Code Suggestions ✨No code suggestions found for the PR. |
Merged
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.



User description
PR Type
Enhancement, Tests
Description
Extract diff helpers into new
diff.goAdd
diff_test.gocovering diff and message buildersImprove
main.goerror handling and exit codesUpdate
Makefilewith wildcard targets andlintDiagram Walkthrough
File Walkthrough
diff.go
Extract diff helpers into dedicated filediff.go
diff,getLines,buildDiffMsg, andbuildNoDifferenceMsggonpto compute unified diffs between two filesio.EOFwhen reading file preview bytesmain.go
Improve main error handling and constantsmain.go
diff.goOK,WARNING,CRITICAL,UNKNOWNmainerror handling for help output and missing command%wand ignoreos.Removereturndiff_test.go
Add unit tests for diff helpersdiff_test.go
diff.gofunctionsdiff,buildDiffMsg,buildNoDifferenceMsg, and large-resulttruncation
main_test.go
Clean up tests after diff extractionmain_test.go
diff_test.gofile.SeekinTestCmdos.Removereturn value increateTempFilecleanupMakefile
Streamline build targets and add lintMakefile
*.gowildcard forcheck-diffandlinuxtargetslinttarget runninggolangci-lint run ./...