Skip to content

Add support for deferred closer functions which are not methods#33

Merged
ryanrolds merged 1 commit intoryanrolds:mainfrom
vanntile:main
Nov 3, 2023
Merged

Add support for deferred closer functions which are not methods#33
ryanrolds merged 1 commit intoryanrolds:mainfrom
vanntile:main

Conversation

@vanntile
Copy link
Copy Markdown
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
Copy Markdown
Owner

Merging. Thank you.

@ryanrolds ryanrolds merged commit dea8e5a into ryanrolds:main Nov 3, 2023
@ryanrolds
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants