-
Notifications
You must be signed in to change notification settings - Fork 65
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
no suggested fixes in analyzer report #146
Comments
|
I know about that approach, but it will not work in my case, I need the suggested fixes. |
Agree, you need to create a wrapper to get the fixes as golangci-lint does for many other linters. If you are interested in optimizing it, I am happy to review it. Or I will label as won't fix and close since it is not a common requirement. Thank you for choosing GCI! |
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>
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>
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 #146 Signed-off-by: Sergey Vilgelm <sergey@vilgelm.com>
Hi, I'm creating my own (yes, one more) linter :) based on the multichecker and import
gci
as a lib,pkg/analyzer
.Everything works fine, the
GCI
provides an error message, but it does not provide the suggested fixes, so the files cannot be formatted automatically :-(Could you please extend the analyzer to include the fixes as well?
Thank you!
What version of GCI are you using?
The text was updated successfully, but these errors were encountered: