-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Typecheck runs even though it is not an enabled linter #2063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, typecheck is not a real linter, it's a way to display compilation errors reported by the other linters. |
I'm a bit confused, there are no compilation errors when compiling with the plain go compiler, so why is typecheck reporting that there are? Also, after investigating the errors, typecheck is reporting errors that don't actually exist, such as a named import not being used by its name, when it clearly is (potentially related issue #1921). Is there anything I can do to further investigate why these erroneous errors are being reported? |
@ewrenn8 your problem is related to your You have to do a $ golangci-lint run
WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive.
pkg/apiserver/client/clientset/versioned/typed/datapackaging/v1alpha1/fake/fake_package.go:30:3: c.Fake.Invokes undefined (type *FakeDataV1alpha1 has no field or method Invokes) (typecheck)
Invokes(testing.NewGetAction(PackagesResource, c.ns, name), &v1alpha1.Package{})
^
...
pkg/apiserver/registry/datapackaging/package_metadata_crd_rest_test.go:22:2: "k8s.io/client-go/testing" imported but not used as cgtesting (typecheck)
cgtesting "k8s.io/client-go/testing"
^
$ go mod vendor
$ git status -sb
## go-version-bump...origin/go-version-bump
D vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go
D vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go
D vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto
D vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md
D vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json
?? vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.go
?? vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.pb.go
?? vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.proto
?? vendor/github.com/googleapis/gnostic/openapiv2/README.md
?? vendor/github.com/googleapis/gnostic/openapiv2/openapi-2.0.json
$ golangci-lint run
WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive. |
I would really appreciate this being fixed as it's seriously blocking bazel integration. |
There is nothing to fix: typecheck is not real linter, it's a way to display "compilation" errors throw by linters. |
Description of the problem
When running with
golangci-lint
version1.40.0
, we are seeing that, although we have explicitly disabled all linters in our config and only enabled a few, not includingtypecheck
, thetypecheck
linter is still running.Version of golangci-lint
v0.40.0
Config file
Go environment
For context, this is not running with the bare binary, it is running in a github action. I opened the issue here, because the binary is reporting conflicting info and I figured that is not due to the action itself. Here are some potentially helpful links:
typecheck
isn't an enabled linterIf I am mistaken and this issue should be opened some place else, please let me know.
Thank you!
The text was updated successfully, but these errors were encountered: