You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is a old issue, but the previous one (#419) is close, so I create a new one.
after I lookin to the code, I found in : pkg/result/processors/max_per_file_from_linter.go funciton: NewMaxPerFileFromLinter, the maxPerFileFromLinterConfig is set to 3 for typecheck, so the cmd flag:
--max-issues-per-linter
will not work for typecheck
the function code is :
func NewMaxPerFileFromLinter(cfg *config.Config) *MaxPerFileFromLinter {
maxPerFileFromLinterConfig := map[string]int{
"typecheck": 3,
}
if !cfg.Issues.NeedFix {
// if we don't fix we do this limiting to not annoy user;
// otherwise we need to fix all issues in the file at once
maxPerFileFromLinterConfig["gofmt"] = 1
maxPerFileFromLinterConfig["goimports"] = 1
}
return &MaxPerFileFromLinter{
flc: fileToLinterToCountMap{},
maxPerFileFromLinterConfig: maxPerFileFromLinterConfig,
}
}
I'm not familiar with this project, so I don't know why the maxPerFileFromLinterConfig is defined like this. Is there any one can figure it out and make the max-issues-per-linter flag work correctly for typecheck?
The text was updated successfully, but these errors were encountered:
So, this code was added in this commit b361146 first time, but I didn't find any details about this decision. @golangci/core-team Could you please clarify this?
The errors reported by typecheck must be seen as compilation errors, and when a compilation error occurs a lot of "false" compilation errors will be reported like in a classic compilation.
So the limit is here to avoid being flood by those errors.
this is a old issue, but the previous one (#419) is close, so I create a new one.
after I lookin to the code, I found in : pkg/result/processors/max_per_file_from_linter.go funciton: NewMaxPerFileFromLinter, the maxPerFileFromLinterConfig is set to 3 for typecheck, so the cmd flag:
will not work for typecheck
the function code is :
I'm not familiar with this project, so I don't know why the maxPerFileFromLinterConfig is defined like this. Is there any one can figure it out and make the
max-issues-per-linter
flag work correctly for typecheck?The text was updated successfully, but these errors were encountered: