mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
JS: Ensure json files are extracted properly in tests
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
|
||||
|
||||
@@ -301,9 +301,14 @@ public class Main {
|
||||
// only extract HTML and JS by default
|
||||
addIncludesFor(includes, FileType.HTML);
|
||||
addIncludesFor(includes, FileType.JS);
|
||||
includes.add("**/.babelrc*.json");
|
||||
|
||||
|
||||
// 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