mirror of
https://github.com/github/codeql.git
synced 2026-05-20 14:17:11 +02:00
JS: Ensure tsconfig.json files are extracted in qltest
QLTests still use the Main.java entry point, which didn't extract tsconfig.json and didn't allow non-standard JSON syntax such as trailing commas that are allowed in tsconfig.json files.
This commit is contained in:
@@ -29,7 +29,7 @@ public class JSONExtractor implements IExtractor {
|
||||
private final boolean tolerateParseErrors;
|
||||
|
||||
public JSONExtractor(ExtractorConfig config) {
|
||||
this.tolerateParseErrors = config.isTolerateParseErrors();
|
||||
this.tolerateParseErrors = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -303,7 +303,10 @@ public class Main {
|
||||
addIncludesFor(includes, FileType.JS);
|
||||
|
||||
// extract TypeScript if `--typescript` or `--typescript-full` was specified
|
||||
if (getTypeScriptMode(ap) != TypeScriptMode.NONE) addIncludesFor(includes, FileType.TYPESCRIPT);
|
||||
if (getTypeScriptMode(ap) != TypeScriptMode.NONE) {
|
||||
addIncludesFor(includes, FileType.TYPESCRIPT);
|
||||
includes.add("**/tsconfig*.json");
|
||||
}
|
||||
|
||||
// add explicit include patterns
|
||||
for (String pattern : ap.getZeroOrMore(P_INCLUDE))
|
||||
|
||||
Reference in New Issue
Block a user