Skip to content
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

New version of depguard linter included in golangci-lint v1.53.0 and newer fails when run without explicit configuration #1024

Closed
atc0005 opened this issue Jun 5, 2023 · 0 comments · Fixed by #1025
Assignees
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Jun 5, 2023

Overview

v2 of the depguard linter changes the default behavior of the linter. Now, when enabled in the golangci-lint configuration but without an explicitly defined settings block the linter will emit errors like these:

internal\config\config.go:18:2: import 'github.com/rs/zerolog' is not allowed from list 'Main' (depguard)
        "github.com/rs/zerolog"
        ^
internal\config\getters.go:13:2: import 'github.com/atc0005/go-nagios' is not allowed from list 'Main' (depguard)
        "github.com/atc0005/go-nagios"
        ^
internal\config\logging.go:14:2: import 'github.com/rs/zerolog' is not allowed from list 'Main' (depguard)
        "github.com/rs/zerolog"
        ^

This fails any CI runs which execute golangci-lint using current configurations.

Current settings

linters:
enable:
- depguard

linters:
enable:
- depguard

linters:
enable:
- depguard

References

@atc0005 atc0005 added this to the v0.10.6 milestone Jun 5, 2023
@atc0005 atc0005 self-assigned this Jun 5, 2023
atc0005 added a commit that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define
"global" permit/deny lists for any projects using images from
this project.

refs GH-1024
atc0005 added a commit to atc0005/elbow that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/bounce that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/brick that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/bridge that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-cert that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-illiad that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-mail that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-ntpt that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-path that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-process that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-restart that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-statuspage that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-vmware that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/check-whois that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/dnsc that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/go-ezproxy that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/go-lockss that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/mysql2sqlite that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/go-nagios that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/nagios-debug that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/query-meta that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/safelinks that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/send2teams that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
atc0005 added a commit to atc0005/tsm-pass that referenced this issue Jun 5, 2023
By having v2 of the linter enabled without an explicitly
defined configuration the linter assumes that *no* non-stdlib
packages are permitted.

We disable the linter because we do not have any need to define permit/deny
lists for packages used by this project at this time.

refs atc0005/go-ci#1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant