mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Extract SAP XSJS file types as Javascript
This commit is contained in:
@@ -42,6 +42,7 @@ import com.google.gson.JsonParseException;
|
||||
import com.semmle.js.dependencies.AsyncFetcher;
|
||||
import com.semmle.js.dependencies.DependencyResolver;
|
||||
import com.semmle.js.dependencies.packument.PackageJson;
|
||||
import com.semmle.js.extractor.AutoBuild.JSDiagnosticKind;
|
||||
import com.semmle.js.extractor.ExtractorConfig.SourceType;
|
||||
import com.semmle.js.extractor.FileExtractor.FileType;
|
||||
import com.semmle.js.extractor.trapcache.DefaultTrapCache;
|
||||
@@ -151,7 +152,7 @@ import com.semmle.util.trap.TrapWriter;
|
||||
*
|
||||
* <ul>
|
||||
* <li>All JavaScript files, that is, files with one of the extensions supported by {@link
|
||||
* FileType#JS} (currently ".js", ".jsx", ".mjs", ".cjs", ".es6", ".es").
|
||||
* FileType#JS} (currently ".js", ".jsx", ".mjs", ".cjs", ".es6", ".es", ".xsjs", ".xsjslib").
|
||||
* <li>All HTML files, that is, files with with one of the extensions supported by {@link
|
||||
* FileType#HTML} (currently ".htm", ".html", ".xhtm", ".xhtml", ".vue", ".html.erb", ".html.dot", ".jsp").
|
||||
* <li>All YAML files, that is, files with one of the extensions supported by {@link
|
||||
|
||||
@@ -135,7 +135,7 @@ public class FileExtractor {
|
||||
}
|
||||
},
|
||||
|
||||
JS(".js", ".jsx", ".mjs", ".cjs", ".es6", ".es") {
|
||||
JS(".js", ".jsx", ".mjs", ".cjs", ".es6", ".es", ".xsjs", ".xsjslib") {
|
||||
@Override
|
||||
public IExtractor mkExtractor(ExtractorConfig config, ExtractorState state) {
|
||||
return new ScriptExtractor(config, state);
|
||||
|
||||
@@ -178,6 +178,8 @@ public class AutoBuildTests {
|
||||
addFile(true, LGTM_SRC, "tst.js");
|
||||
addFile(true, LGTM_SRC, "tst.ts");
|
||||
addFile(true, LGTM_SRC, "tst.html");
|
||||
addFile(true, LGTM_SRC, "tst.xsjs");
|
||||
addFile(true, LGTM_SRC, "tst.xsjslib");
|
||||
addFile(false, LGTM_SRC, "tst.json");
|
||||
addFile(true, LGTM_SRC, "package.json");
|
||||
addFile(true, LGTM_SRC, ".eslintrc.yml");
|
||||
|
||||
Reference in New Issue
Block a user