mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Will need subsequent PRs fixing up test failures (due to deprecated methods moving around), but other than that everything should be straight-forward.
17 lines
297 B
Plaintext
17 lines
297 B
Plaintext
/**
|
|
* @id py/examples/tryfinally
|
|
* @name Try-finally statements
|
|
* @description Finds try-finally statements without an exception handler
|
|
* @tags try
|
|
* finally
|
|
* exceptions
|
|
*/
|
|
|
|
import python
|
|
|
|
from Try t
|
|
where
|
|
exists(t.getFinalbody()) and
|
|
not exists(t.getAHandler())
|
|
select t
|