mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
19 lines
474 B
Plaintext
19 lines
474 B
Plaintext
import csharp
|
|
import semmle.code.csharp.commons.Compilation
|
|
|
|
bindingset[arg]
|
|
private string normalize(string arg) {
|
|
(not exists(arg.indexOf(":")) or not exists(arg.indexOf("/8.0"))) and
|
|
result = arg
|
|
or
|
|
exists(int i, int j |
|
|
i = arg.indexOf(":") and
|
|
j = arg.indexOf("/8.0") and
|
|
result = arg.substring(0, i + 1) + "[...]" + arg.substring(j, arg.length())
|
|
)
|
|
}
|
|
|
|
from Compilation c, int i, string s
|
|
where s = normalize(c.getExpandedArgument(i))
|
|
select i, s
|