Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support suggested fixes by analyzing a diff #148

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

SVilgelm
Copy link
Contributor

@SVilgelm SVilgelm commented Mar 8, 2023

Added GetSuggestedFix function creates unified diff for unmodifiedFile and formattedFile.
Then analyzes the diff and creates analysis.SuggestedFix if needed.

The Analyzer checks the result of GetSuggestedFix function and reports as analysis.Diagnostic.

Removed the inspect.Analyzer dependency since it is not used, but requires extra work

Fix #146

@SVilgelm SVilgelm force-pushed the fix-146-suggested-fixes branch 3 times, most recently from d5a859f to 6307ed6 Compare March 8, 2023 21:49
pkg/utils/diff.go Outdated Show resolved Hide resolved
Added `GetSuggestedFix` function creates unified diff for `unmodifiedFile` and `formattedFile`.
Then analyzes the diff and creates `analysis.SuggestedFix` if needed.

The Analyzer checks the result of `GetSuggestedFix` function and reports as `analysis.Diagnostic`.

Fix daixiang0#146

Signed-off-by: Sergey Vilgelm <sergey@vilgelm.com>
@daixiang0 daixiang0 merged commit d6e755b into daixiang0:master Mar 9, 2023
@SVilgelm SVilgelm deleted the fix-146-suggested-fixes branch March 9, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no suggested fixes in analyzer report
2 participants