mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Python: Remove mutable default sources from inside stdlib
This commit is contained in:
@@ -75,7 +75,11 @@ module ModificationOfParameterWithDefault {
|
||||
class MutableDefaultValue extends Source {
|
||||
boolean nonEmpty;
|
||||
|
||||
MutableDefaultValue() { nonEmpty = mutableDefaultValue(this.asCfgNode().(NameNode).getNode()) }
|
||||
MutableDefaultValue() {
|
||||
nonEmpty = mutableDefaultValue(this.asCfgNode().(NameNode).getNode()) and
|
||||
// Ignore sources inside the standard library. These are unlikely to be true positives.
|
||||
exists(this.getLocation().getFile().getRelativePath())
|
||||
}
|
||||
|
||||
override boolean isNonEmpty() { result = nonEmpty }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user