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

Don't alert when the row/stmt is stored in a struct #17

Merged
merged 2 commits into from
Jan 29, 2023

Conversation

nirhaas
Copy link
Contributor

@nirhaas nirhaas commented Dec 23, 2021

  • In attempt to avoid an alert on a Prepared Statement not closed (which is for a good reason, it is being re-used as intended), I added the logic to not alert when the target is stored in a struct.
    • This logic is not perfect. It would be better if we check the lifetime of the struct as well, or that the function itself that is storing is a struct method. I don't have much experience with analyzing SSA so if this needs some improvements, let me know.
  • Changes to Makefile to allow make test without go install.

If the row/stmt is stored in a struct, it may Close it in a different workflow. For
example when using Prepared Statement, the stmt can be used for the whole duration
of the program - No need to alert on that.
@ryanrolds ryanrolds merged commit c2dc47e into ryanrolds:main Jan 29, 2023
@ryanrolds
Copy link
Owner

ryanrolds commented Jan 29, 2023

Thank you. Merged and in the pre-release.

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.

None yet

2 participants