Skip to content

Commit 45a48f3

Browse files
committed
Extract SAP XSJS file types as Javascript
1 parent e9bd85e commit 45a48f3

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import com.semmle.js.dependencies.AsyncFetcher;
4343
import com.semmle.js.dependencies.DependencyResolver;
4444
import com.semmle.js.dependencies.packument.PackageJson;
45+
import com.semmle.js.extractor.AutoBuild.JSDiagnosticKind;
4546
import com.semmle.js.extractor.ExtractorConfig.SourceType;
4647
import com.semmle.js.extractor.FileExtractor.FileType;
4748
import com.semmle.js.extractor.trapcache.DefaultTrapCache;
@@ -151,7 +152,7 @@
151152
*
152153
* <ul>
153154
* <li>All JavaScript files, that is, files with one of the extensions supported by {@link
154-
* FileType#JS} (currently ".js", ".jsx", ".mjs", ".cjs", ".es6", ".es").
155+
* FileType#JS} (currently ".js", ".jsx", ".mjs", ".cjs", ".es6", ".es", ".xsjs", ".xsjslib").
155156
* <li>All HTML files, that is, files with with one of the extensions supported by {@link
156157
* FileType#HTML} (currently ".htm", ".html", ".xhtm", ".xhtml", ".vue", ".html.erb", ".html.dot", ".jsp").
157158
* <li>All YAML files, that is, files with one of the extensions supported by {@link

javascript/extractor/src/com/semmle/js/extractor/FileExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ protected boolean contains(File f, String lcExt, ExtractorConfig config) {
135135
}
136136
},
137137

138-
JS(".js", ".jsx", ".mjs", ".cjs", ".es6", ".es") {
138+
JS(".js", ".jsx", ".mjs", ".cjs", ".es6", ".es", ".xsjs", ".xsjslib") {
139139
@Override
140140
public IExtractor mkExtractor(ExtractorConfig config, ExtractorState state) {
141141
return new ScriptExtractor(config, state);

javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ public void basicTest() throws IOException {
178178
addFile(true, LGTM_SRC, "tst.js");
179179
addFile(true, LGTM_SRC, "tst.ts");
180180
addFile(true, LGTM_SRC, "tst.html");
181+
addFile(true, LGTM_SRC, "tst.xsjs");
182+
addFile(true, LGTM_SRC, "tst.xsjslib");
181183
addFile(false, LGTM_SRC, "tst.json");
182184
addFile(true, LGTM_SRC, "package.json");
183185
addFile(true, LGTM_SRC, ".eslintrc.yml");

0 commit comments

Comments
 (0)