-
Notifications
You must be signed in to change notification settings - Fork 29
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
ignorePackageGlobs doesn't appear to be working #34
Comments
G'day @Southclaws, cheers for the report. I've done some digging, and have a suggestion. Would you be able to try the config below? ignorePackageGlobs:
- "*github.com/Southclaws/storyden/pkg*" I suspect it may be because of the glob matching when it comes to leading characters, in the tests there is nothing but a space before the package name in the signature, however in yours there is a parenthesis I agree that this isn't a particularly good experience, and I've found some usability improvements which could be made to the glob matching which I'll work on, but in the meantime this should get you moving forward. Cheers |
@Southclaws, would you be able to try out the above? |
@tomarrell I also had the same problem. In my case, adding
|
A workaround you could do is until there is a fix ignoreSigRegexps:
- '.*github.com/your-org/project/.*' |
Thanks for the info @hackerwins, I'll look at reproducing your case and pushing a fix soon. |
@hackerwins @Southclaws I've just pushed release v2.7.0 which makes this configuration value apply to functions called through interfaces, hopefully making it a bit more intuitive. Let me know if you run into any further issues. Cheers |
Awesome stuff, thanks! |
@tomarrell Thanks for the update. |
@hackerwins no worries, it should be out in the next release. The update PR has already been merged into golangci-lint golangci/golangci-lint#3287 |
Hey, great tool! This has been really useful to track down places I can apply some new error context packages I've been working on to provide additional structured information to errors.
After applying error contexts across our project I noticed a few places where it was unnecessary so I decided to disable reporting of imports from local packages (/pkg, etc)
However, maybe I'm misunderstanding this config option, but it doesn't appear to do what I expected.
Here's the configuration file: https://github.com/Southclaws/storyden/blob/main/.golangci.yml#L28
And here are the offending lines:
I assumed that a
ignorePackageGlobs
value ofjackfan.us.kg/Southclaws/storyden/*
would ignore these two lines as they are functions that are imported from within this pattern:i.thread_svc.Create
:github.com/Southclaws/storyden/pkg/services/thread.Service.Create
i.thread_svc.ListAll
:github.com/Southclaws/storyden/pkg/services/thread.Service.Create
The actual output from running
golangci-lint run
:I wondered if it was golangci lint just using an outdated version but this occurs on the latest standalone version of wrapcheck too.
I tried with a .wrapcheck.yaml file with:
but I can't seem to get any patterns to ignore correctly.
Thanks!
The text was updated successfully, but these errors were encountered: