Closed
Description
Is your feature request related to a problem? Please describe.
Add support for SuggestedFixes.
Describe the solution you'd like
Be able to apply automatically the fixes via --fix
.
Describe alternatives you've considered
Display the suggestion as extra information.
Additional context
type Diagnostic struct {
// ...
// SuggestedFixes contains suggested fixes for a diagnostic which can be used to perform
// edits to a file that address the diagnostic.
// TODO(matloob): Should multiple SuggestedFixes be allowed for a diagnostic?
// Diagnostics should not contain SuggestedFixes that overlap.
// Experimental: This API is experimental and may change in the future.
SuggestedFixes []SuggestedFix // optional
// ...
}
Current linters that support SuggestedFixes
:
goerr113
ruleguard
staticcheck
nlreturn
exportloopref
exhaustive
govet
Related to #1728
If you want to help me:
Latest update: #1779 (comment)