-
Notifications
You must be signed in to change notification settings - Fork 18
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
Intermittent incorrect "xyz
is in the denylist" errors
#25
Comments
It looks like this issue mentions the itermittent denylisting in the body, however, we are not observing the NPEs discussed in that issue. |
hello @bmhatfield, I'm interested in a reproducible use case, have you something to share? |
I am facing with the same issue. And as @bmhatfield, this issue is more prevalent with Go 1.19 on my local machine (Linux) and in our CI (on-premise gitlab). |
Here's an example snippet of our config, though I imagine anything would do this. Because this is intermittent / random, I don't really have a reliable reproduce case beyond
|
As workaround, we have disabled the |
Disabling a linter is not really a workaround for this linter 😉 You just stopped to use the linter. |
You 're right ;) |
Thanks for feedback. I have a WIP V2 branch that is very early in development (past few hours). I think the intermittent issues comes with golangci-lint making concurrent calls with depguard's single configuration (which it was not designed to handle back in golangci-lint v1.4). I believe these concurrent issues are what you are seeing. |
So I have a working beta go install github.com/OpenPeeDeeP/depguard/v2/cmd/[email protected] I have tested on a few repositories. But would like others to try it out to. |
golangci/golangci-lint#3116 OpenPeeDeeP/depguard#25 Signed-off-by: Luke Shumaker <[email protected]>
* feat: fixed json errors and some forbidden imports * feat: fixed base tests * feat: added more checks * feat: next batch of lints fixed * feat: more passed checks * feat: next batch of lints * feat: working pre-push hook * feat: fixed test crashes * fix: changed requirements for CONTRIBUTING.md * fix: flaky depguard * fix: upgraded golangci-lint to preventing OpenPeeDeeP/depguard#25
It looks like #23 has been pulled in by |
I have just released version 2 |
Hi there,
We're using
depguard
as part ofgolangci-lint
(v1.47.3). We've been getting intermittent false positives - given the same code and same rules, re-running multiple times will produce different results. Each of the false positives do not match any of our actual rules (of which we have 3). The false positives themselves change - they don't seem to be centered around any particular package in our repository. True positives (ie, a rule that has legitimately been broken) seem reliable.I haven't been able to track down if any particular condition seems to cause this false positive behavior. Clearing the go and golangci-lint caches doesn't seem to influence the behavior. It seems to have become more prevalent on more recent versions of Go, especially since 1.18 but increasing in 1.19. It occurs both locally (MacOS) and in CI (CircleCI, Alpine Linux container).
I'm painfully aware that this issue description is light on technical detail, because I haven't been able to diagnose this issue so far. I've been delaying filing it for some time because of this, but nobody else seems to have filed this as an issue, so I thought I would at least start the conversation. Is anyone else seeing this?
The text was updated successfully, but these errors were encountered: