mirror of
https://github.com/github/codeql.git
synced 2026-06-21 21:01:13 +02:00
Undo conversion for queries that import LegacyPointsTo
This commit is contained in:
@@ -1,2 +1 @@
|
||||
query: Exceptions/IllegalExceptionHandlerType.ql
|
||||
postprocess: utils/test/InlineExpectationsTestQuery.ql
|
||||
Exceptions/IllegalExceptionHandlerType.ql
|
||||
@@ -1,2 +1 @@
|
||||
query: Exceptions/IllegalRaise.ql
|
||||
postprocess: utils/test/InlineExpectationsTestQuery.ql
|
||||
Exceptions/IllegalRaise.ql
|
||||
@@ -37,21 +37,21 @@ class NotException2(object):
|
||||
pass
|
||||
|
||||
def illegal_raise_type():
|
||||
raise NotException1 # $ Alert[py/illegal-raise]
|
||||
raise NotException1
|
||||
|
||||
def illegal_raise_value1():
|
||||
raise "Exception" # $ Alert[py/illegal-raise]
|
||||
raise "Exception"
|
||||
|
||||
def illegal_raise_value2():
|
||||
raise NotException2() # $ Alert[py/illegal-raise]
|
||||
raise NotException2()
|
||||
|
||||
def illegal_handler():
|
||||
try:
|
||||
illegal_raise()
|
||||
except NotException1: # $ Alert[py/useless-except]
|
||||
except NotException1:
|
||||
#Must do something
|
||||
print("NotException1")
|
||||
except NotException2: # $ Alert[py/useless-except]
|
||||
except NotException2:
|
||||
#Must do something
|
||||
print("NotException2")
|
||||
|
||||
@@ -135,7 +135,7 @@ def a_number():
|
||||
def illegal_handler2():
|
||||
try:
|
||||
illegal_raise()
|
||||
except a_number(): # $ Alert[py/useless-except]
|
||||
except a_number():
|
||||
print ("Caught exception")
|
||||
|
||||
def stop_iter_ok(seq):
|
||||
|
||||
@@ -11,9 +11,10 @@ def test():
|
||||
try:
|
||||
a = A()
|
||||
raise a
|
||||
except 42: # $ Alert[py/useless-except]
|
||||
except 42:
|
||||
#Some comment
|
||||
pass
|
||||
except A:
|
||||
#Another comment
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user