Files
codeql/java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/compArgs.ql
Ian Lynagh caa56c9cad Kotlin: compiler_arguments test: Normalise path separators in output
Otherwise we get different output on Windows vs Posix.
2022-10-31 16:31:08 +00:00

16 lines
386 B
Plaintext

import java
private string getArgument(Compilation c, int i) {
exists(string arg | arg = c.getArgument(i) |
if exists(arg.indexOf("-Xplugin="))
then result = "<PLUGINS>"
else
if c.getArgument(i - 1) = ["-classpath", "-jdk-home"]
then result = "<PATH>"
else result = arg
)
}
from Compilation c, int i
select i, getArgument(c, i).replaceAll("\\", "/")