mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Python: Autoformat
I'm not particularly happy about this one, but I don't care to fight about it today.
This commit is contained in:
@@ -8,37 +8,14 @@ abstract class StringKind extends TaintKind {
|
||||
StringKind() { this = this }
|
||||
|
||||
override TaintKind getTaintOfMethodResult(string name) {
|
||||
name in [
|
||||
"capitalize",
|
||||
"casefold",
|
||||
"center",
|
||||
"expandtabs",
|
||||
"format",
|
||||
"format_map",
|
||||
"ljust",
|
||||
"lstrip",
|
||||
"lower",
|
||||
"replace",
|
||||
"rjust",
|
||||
"rstrip",
|
||||
"strip",
|
||||
"swapcase",
|
||||
"title",
|
||||
"upper",
|
||||
"zfill",
|
||||
/* encode/decode is technically not correct, but close enough */
|
||||
"encode",
|
||||
"decode"
|
||||
] and
|
||||
name in ["capitalize", "casefold", "center", "expandtabs", "format", "format_map", "ljust",
|
||||
"lstrip", "lower", "replace", "rjust", "rstrip", "strip", "swapcase", "title", "upper",
|
||||
"zfill",
|
||||
/* encode/decode is technically not correct, but close enough */
|
||||
"encode", "decode"] and
|
||||
result = this
|
||||
or
|
||||
name in [
|
||||
"partition",
|
||||
"rpartition",
|
||||
"rsplit",
|
||||
"split",
|
||||
"splitlines"
|
||||
] and
|
||||
name in ["partition", "rpartition", "rsplit", "split", "splitlines"] and
|
||||
result.(SequenceKind).getItem() = this
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user