-
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
Panic: depguard: package \"rabbitmq\" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [-1] #74
Comments
Can you post your config as well (Just the depguard one). The following is where the panic occured, but |
|
@Creatone thanks! I will take a look as soon as I can. I can't see anything wrong with the configs right off the top of my head. |
@Creatone using your configurations and running against depguard repository (the tagged v2.1.0), I am unable to reproduce the panic. Is there a repository I can reproduce your configuration against? What OS are you running? Any other bit of information like, did it work partially for some packages but not all packages. |
I was able to reproduce this bug and find a workaround. The problem lies within deny:
- pkg: "github.com/sirupsen/logrus"
desc: not allowed
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package Whereas the config for depguard standalone is a deny map: deny:
reflect: Please don't use reflect package BTW the last README example uses a list syntax: Main:
deny:
- github.com/OpenPeeDeeP/depguard$ |
I propose to add a comment to the golangci documentation: golangci/golangci-lint#4227 |
Since the maintainer of golangci refuses to draw attention to this discrepancy, it might be wise to add it to your README. |
@oliverpool thaaanks |
Sounds good to me. |
Got this using golangci-lint
v1.55.1
The text was updated successfully, but these errors were encountered: