mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
We are no longer bound to the platform-specific directories, so simplify the test organization. If you don't want this change, just skip merging this PR. It's purely optional. This is not very invasive for C#, I'm just dropping the `only` suffix. You could also merge all the platform-specific test dirs, or all test dirs into the top-level directory. I'll leave that up to you.
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
|