ryanrolds / sqlclosecheck

Linter that confirms DB rows and statements are closed properly.
MIT License
83 stars 15 forks source link

(cont) Add support for deferred closer functions which are not methods #34

Closed vanntile closed 1 year ago

vanntile commented 1 year ago

This is a fix PR relating to #33 - empty return functions would be assumed to prime handling the closing of rows statements. This is obviously only true if the return instruction's results include one of the relevant types.

As a result, deferred functions which do not close the initial statement would pass without a linter error. I have added a test to verify this case outputs an error.

This probably completes the issue #7

ryanrolds commented 1 year ago

Thank you.

vanntile commented 1 year ago

Thank you for being responsive!