File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
python/ql/test/experimental/dataflow/TestUtil Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ import python
12import semmle.python.dataflow.new.DataFlow:: DataFlow
23import semmle.python.dataflow.new.internal.DataFlowPrivate
34import semmle.python.dataflow.new.internal.DataFlowImplConsistency:: Consistency
@@ -18,4 +19,20 @@ private class MyConsistencyConfiguration extends ConsistencyConfiguration {
1819 // being a post-update node for the synthetic `**kwargs` parameter.
1920 n instanceof SynthDictSplatParameterNode
2021 }
22+
23+ override predicate uniqueParameterNodePositionExclude (
24+ DataFlowCallable c , ParameterPosition pos , Node p
25+ ) {
26+ // For normal parameters that can both be passed as positional arguments or keyword
27+ // arguments, we currently have parameter positions for both cases..
28+ //
29+ // TODO: Figure out how bad breaking this consistency check is
30+ exists ( Function func , Parameter param |
31+ c .getScope ( ) = func and
32+ p = parameterNode ( param ) and
33+ c .getParameter ( pos ) = p and
34+ param = func .getArg ( _) and
35+ param = func .getArgByName ( _)
36+ )
37+ }
2138}
You can’t perform that action at this time.
0 commit comments