When using the DB connectors (eg: mysql), the connection should be closed after the usage otherwise the connection will be exhausted. But currently there's no way to identify if user code has the connection close statement:
check mysqlEndpoint.close();
Hence it would be better if a compiler extension would support this requirement to do a static analysis on the code and check and throw a warning if user's code is missing the close statement.
Description:
When using the DB connectors (eg: mysql), the connection should be closed after the usage otherwise the connection will be exhausted. But currently there's no way to identify if user code has the connection close statement:
Hence it would be better if a compiler extension would support this requirement to do a static analysis on the code and check and throw a warning if user's code is missing the close statement.
Related similar issue: https://github.com/ballerina-platform/ballerina-standard-library/issues/2400