Skip to content

Commit 53711dc

Browse files
authored
Merge pull request github#5238 from RasmusWL/no-flow-default-value
Python: Highlight missing flow from default value in functions
2 parents 3f7f963 + 5249b54 commit 53711dc

File tree

1 file changed

+6
-0
lines changed
  • python/ql/test/experimental/dataflow/coverage

1 file changed

+6
-0
lines changed

python/ql/test/experimental/dataflow/coverage/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,3 +790,9 @@ def test_reverse_read_subscript_cls():
790790
l = [withA]
791791
l[0].setA(SOURCE)
792792
SINK(withA.a) #$ MISSING:flow="SOURCE, l:-1 -> self.a"
793+
794+
@expects(3)
795+
def test_with_default_param_value(x=SOURCE, /, y=SOURCE, *, z=SOURCE):
796+
SINK(x) #$ MISSING:flow="SOURCE, l:-1 -> x"
797+
SINK(y) #$ MISSING:flow="SOURCE, l:-2 -> y"
798+
SINK(z) #$ MISSING:flow="SOURCE, l:-3 -> z"

0 commit comments

Comments
 (0)