Skip to content

Commit 7ab0f88

Browse files
committed
JS: add link to docs to parse error diagnostic
1 parent e5be8ab commit 7ab0f88

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ private void doExtract(FileExtractor extractor, Path file, ExtractorState state)
12361236
if (!extractor.getConfig().isExterns()) seenFiles = true;
12371237
for (ParseError err : loc.getParseErrors()) {
12381238
String msg = "A parse error occurred: " + StringUtil.escapeMarkdown(err.getMessage())
1239-
+ ". Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.";
1239+
+ ". Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.";
12401240
// file, relative to the source root
12411241
String relativeFilePath = null;
12421242
if (file.startsWith(LGTM_SRC)) {

javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"startColumn": 4,
77
"startLine": 1
88
},
9-
"markdownMessage": "A parse error occurred: Unexpected token. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.",
9+
"markdownMessage": "A parse error occurred: Unexpected token. Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.",
1010
"severity": "warning",
1111
"source": {
1212
"extractorName": "javascript",

0 commit comments

Comments
 (0)