JS: add link to docs to parse error diagnostic

This commit is contained in:
Arthur Baars
2023-03-08 16:44:59 +01:00
parent e5be8ab1e5
commit 7ab0f88f78
2 changed files with 2 additions and 2 deletions

View File

@@ -1236,7 +1236,7 @@ protected DependencyInstallationResult preparePackagesAndDependencies(Set<Path>
if (!extractor.getConfig().isExterns()) seenFiles = true;
for (ParseError err : loc.getParseErrors()) {
String msg = "A parse error occurred: " + StringUtil.escapeMarkdown(err.getMessage())
+ ". Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.";
+ ". 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.";
// file, relative to the source root
String relativeFilePath = null;
if (file.startsWith(LGTM_SRC)) {

View File

@@ -6,7 +6,7 @@
"startColumn": 4,
"startLine": 1
},
"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.",
"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.",
"severity": "warning",
"source": {
"extractorName": "javascript",