Closed ldez closed 8 months ago
Thank you @ldez
I understand why (because you want to "autofix" the problem), but the import management is not something that your linter should handle (at least inside golangci-lint) because other linters will handle that.
I want to keep this feature for perfsprint outside of golangci-lint cf #14
Should I just add a bool flag to configure this behavior ?
Adding a flag is a good way to handle the problem.
Another way is to append the suggested fix ([]analysis.SuggestedFix
) to the other reports instead of creating a new report.
Hello,
The "Fix imports" reports seem offtopic for this linter and they are annoying.
Related to #14
Note: I'm using the current dev version of golangci-lint.
In this context, your linter has detected that
fmt
is only related tofmt.Sprintf
, so you are suggesting to remove the import. I understand why (because you want to "autofix" the problem), but the import management is not something that your linter should handle (at least inside golangci-lint) because other linters will handle that.Another problem, if I want to ignore some reports then the reports
Fix imports
will always happen.It's the same thing if I use a
nolint
directive (withoutexclude
configuration):So I suggest removing those reports, at least for golangci-lint.