Improve the error output from goimports
This causes goimports to provide additional information if the "local-prefixes" option has been set.
This commit is contained in:
parent
92b472e8bc
commit
39d7929d61
@ -229,6 +229,9 @@ func extractIssuesFromPatch(patch string, log logutils.Log, lintCtx *linter.Cont
|
||||
var text string
|
||||
if isGoimports {
|
||||
text = "File is not `goimports`-ed"
|
||||
if lintCtx.Settings().Goimports.LocalPrefixes != "" {
|
||||
text += " with -local " + lintCtx.Settings().Goimports.LocalPrefixes
|
||||
}
|
||||
} else {
|
||||
text = "File is not `gofmt`-ed"
|
||||
if lintCtx.Settings().Gofmt.Simplify {
|
||||
|
Loading…
x
Reference in New Issue
Block a user