Closed jeffsaremi closed 2 weeks ago
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
Example of how the error is reported even though go build
and vscode do not report any issues:
type WorkloadGraph struct {
logger *zap.Logger
*datastore.CommonSourceData
}
...
func (a *WorkloadGraph) loadAccounts() {
...
a.Accounts[account.ID] = &datastore.Account{
ID: account.ID,
Name: account.Name,
Region: account.Region,
}
...
now Compare these:
❯ go build ./...
❯ make lint
...
Lint App
golangci-lint has version 1.55.2 built with go1.21.3 from e3c2265f on 2023-11-03T12:59:25Z
internal/graph/builder.go:160:5: a.Accounts undefined (type *WorkloadGraph has no field or method Accounts) (typecheck)
a.Accounts[account.ID] = &datastore.Account{
^
make: *** [lint] Error 1
I don't know why this was closed? I understand that typecheck
is not a linter, yet the tool is reporting errors which are actually not errors! I'm not sure you read my description and examples that I provided?
go build
reports absolutely no errors. SO there is no reason to get an error like that from this tool
SOmeone needs to look into this!
Everything is explained inside the documentation: how to find the cause and how to fix it.
Your example is not a minimum reproducible example (ie: I cannot copy-paste your example)
I don't appreciate the tone you are using: I can understand frustration but I have some limits.
ok thank you! the other link you provided is more helpful Is there a way to easily determine the version of go compiler used for each release of golintci? e.g by looking here; https://github.com/golangci/golangci-lint/releases
The only thing I can do with your example is this:
And everything works.
Is there a way to easily determine the version of go compiler used for each release of golintci?
It's golangci-lint.
$ golangci-lint version
golangci-lint has version 1.61.0 built with go1.23.1 from a1d6c560 on 2024-09-09T17:44:42Z
ok thanks!
Welcome
Your feature request related to a problem? Please describe
typecheck
cannot be disabled since it's not a linter. Yet we keep getting errors reported by that. Errors which don't come from thego build
itself! We need a way to disable this annoying behavior. thanksDescribe the solution you'd like
Allow option to completely remove
typecheck
from analysis and error reportingDescribe alternatives you've considered
not using golintci
Additional context
No response
Supporter