-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
v1.53.1 Depguard error #3877
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Can you provide your configuration? Can you fill in the required sections in the issue description? Note: The depguard configuration has completely changed. |
If you are facing the same problem, the best way to contribute is to provide the following information:
And a code example or link to a public repository. If you are not able to provide that information, please just add a 👍 to the issue description, thank you. |
@ldez I included commands outputs in the description |
Then it's because you are using depguard without any configuration. You have to either add a configuration or disable depguard. The default rule of depguard is to allow only std lib in all files. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I will close this issue as it is the expected new behavior. |
Follow up: In order to fix depguard you need to configure depguard in linters-settings:
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/google # all google packages
test:
files:
- "$test"
allow:
- $gostd
- github.com/stretchr Please refer to for more info: https://github.com/OpenPeeDeeP/depguard#example-configs |
The document needs to be updated. |
New version of golangci-lint pulled in a new version of depguard that changed the API, see golangci/golangci-lint#3877
New version of golangci-lint pulled in a new version of depguard that changed the API, see golangci/golangci-lint#3877
New version of golangci-lint pulled in a new version of depguard that changed the API, see golangci/golangci-lint#3877
* go1.20.5 build image * give up on depguard. golangci/golangci-lint#3877 * make linters happy
New version of golangci-lint pulled in a new version of depguard that changed the API, see golangci/golangci-lint#3877
New version of golangci-lint pulled in a new version of depguard that changed the API, see golangci/golangci-lint#3877
* Removes already deprecated[1] linter varcheck * Depguard now expects a list of allow/deny list and default rule is to allow only std lib in all files[2]. Therefore disable the linter. [1] https://golangci-lint.run/product/roadmap/#v1490 [2] golangci/golangci-lint#3877 (comment) Signed-off-by: Anoop C S <anoopcs@samba.org>
* Removes already deprecated[1] linter varcheck * Depguard now expects a list of allow/deny list and default rule is to allow only std lib in all files[2]. Therefore disable the linter. [1] https://golangci-lint.run/product/roadmap/#v1490 [2] golangci/golangci-lint#3877 (comment) Signed-off-by: Anoop C S <anoopcs@samba.org>
* Removes already deprecated[1] linter varcheck * Depguard now expects a list of allow/deny list and default rule is to allow only std lib in all files[2]. Therefore disable the linter. [1] https://golangci-lint.run/product/roadmap/#v1490 [2] golangci/golangci-lint#3877 (comment) Signed-off-by: Anoop C S <anoopcs@samba.org>
* Removes already deprecated[1] linter varcheck * Depguard now expects a list of allow/deny list and default rule is to allow only std lib in all files[2]. Therefore disable the linter. [1] https://golangci-lint.run/product/roadmap/#v1490 [2] golangci/golangci-lint#3877 (comment) Signed-off-by: Anoop C S <anoopcs@samba.org>
This requires additional configuration golangci/golangci-lint#3877 (comment) With the default config, a lot of errors are reported.
This requires additional configuration golangci/golangci-lint#3877 (comment) With the default config, a lot of errors are reported. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
This requires additional configuration golangci/golangci-lint#3877 (comment) With the default config, a lot of errors are reported. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Welcome
Description of the problem
Issue occurs on golangci github action with standard configuration and latest version
Version of golangci-lint
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
// add your code here
The text was updated successfully, but these errors were encountered: