-
Notifications
You must be signed in to change notification settings - Fork 6
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
Blocked modules appears to be ignored in some cases #39
Comments
Hi, I tried to block github.com/gin-gonic/gin version 1.9.16 (last 2 lines) and seems to be ignored as well. Below is my config file. May you take a look. Thanks. linters-settings: |
Thanks for the report and example config. I will look at this soon |
Ok so for @oschwald issue, they put the package name
@Jeeyuen-Rick I'll look at your issue next. |
@Jeeyuen-Rick gomodguard ignores constraint errors, and you have a constraint error, so that's why the gin one is failing. I will have a fix to bubble up constraint errors. In the meantime, you can fix your issue by changing the constraint to For all the valid constraints see: https://github.com/Masterminds/semver?tab=readme-ov-file#basic-comparisons |
Thank you Ryan. |
I think what I am going to do is raise it as a lint error when the constraint is invalid.
|
I believe this is reasonable. Since I didn’t read the document carefully and assumed ‘==’ instead of ‘=’. Thank you again for catching my mistake. |
As reported in #39, if a version constraint is invalid gomodguard ignores it. This changes ensures errors with semver contraints are bubbled up as lint errors. Added test coverage for this.
As reported in #39, if a version constraint is invalid gomodguard ignores it. This changes ensures errors with semver contraints are bubbled up as lint errors. Added test coverage for this.
As reported in #39, if a version constraint is invalid gomodguard ignores it. This changes ensures errors with semver contraints are bubbled up as lint errors. Added test coverage for this.
Resolved via #43 Release https://github.com/ryancurrah/gomodguard/releases/tag/v1.3.2 |
I haven't figured out an exact pattern, but it appears that blocked modules are not flagged in some instances:
If I change
gotest.tools/v3/assert
to another module used in the same file, it seems to work.The text was updated successfully, but these errors were encountered: