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 deferred closer functions which are not methods #33

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

vanntile
Copy link
Contributor

@vanntile vanntile commented Nov 2, 2023

As it has been outlined in #7 - some people need to do some checks whenever they close some statements. If these closer functions are deferred, sqlclosecheck marks the rows as not closed. The current PR fixes that mistake. Test included.

I have also renamed a test that was checking a method, but was actually named like it would have been checking a function.

@ryanrolds
Copy link
Owner

Merging. Thank you.

@ryanrolds ryanrolds merged commit dea8e5a into ryanrolds:main Nov 3, 2023
1 check passed
@ryanrolds
Copy link
Owner

I'm adding some tests and double-checking things. I will cut a release after I build some confidence in the changes.

@ryanrolds
Copy link
Owner

@vanntile, I think I'm seeing a false negative. Please add a test that confirms not calling close in the deferred closer function is caught by the linter.

@vanntile
Copy link
Contributor Author

vanntile commented Nov 3, 2023

Ty for the speed. I will verify myself and create a second MR with the needed changes

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