mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
Adds a test demostrating the false positive observed by andersfugmann. Note that this does not change the `.expected` file, and so the tests will fail. This is expected.
11 lines
191 B
Python
11 lines
191 B
Python
# FP involving global variables modified in a different scope
|
|
|
|
i = 0
|
|
def update_i():
|
|
global i
|
|
i = i + 1
|
|
|
|
update_i()
|
|
if i > 0:
|
|
print("i is greater than 0") # FP: This is reachable
|