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

Add support for math/rand/v2 added in Go 1.22 #1112

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

hyorimitsu
Copy link
Contributor

Summary

Fix for issue #1109

Changes

  • Add support for math/rand/v2 to the existing rule (G404).
  • Modified the function used to extract import names to handle paths with version information.

@ccojocar
Copy link
Member

ccojocar commented Mar 6, 2024

@hyorimitsu Thank you for this contribution. It looks good to me. Please could you have a look a the lint warnings?

@hyorimitsu
Copy link
Contributor Author

hyorimitsu commented Mar 6, 2024

@ccojocar Thank you very much for your review! I have addressed the lint warnings as suggested. With these fixes, I believe the CI should now pass successfully.
(Note that the error in the test for the G601 rule continues to occur, but it is unrelated to the current changes, so I am ignoring it.)

@ccojocar
Copy link
Member

ccojocar commented Mar 7, 2024

@hyorimitsu Thanks for fixing the lint warnings. Please could you rebase? I update the go version and fixed the failing test.

@hyorimitsu
Copy link
Contributor Author

@ccojocar Thanks for the update. I've completed the rebase.

@ccojocar ccojocar merged commit 11c3252 into securego:master Mar 7, 2024
5 of 6 checks passed
@hyorimitsu hyorimitsu deleted the support-rand-v2 branch March 7, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants