We are using SonarLint in connected mode with a SonarQube server version 7.0 (build 36138). Here’s a list of the SonarQube plugins:
- sonar-flex-plugin-2.3.jar
- sonar-pitest-plugin-0.9.jar
- sonar-csharp-plugin-6.7.1.4347.jarson
- sonar-javascript-plugin-4.0.0.5862.jar
- sonar-java-plugin-5.6.0.15032.jar
- sonar-php-plugin-2.12.1.3018.jar
- sonar-python-plugin-1.9.0.2010.jar
- sonar-scm-git-plugin-1.3.0.869.jar
- sonar-scm-svn-plugin-1.6.0.860.jar
- sonar-typescript-plugin-1.5.0.2122.jar
- sonar-xml-plugin-1.4.3.1027.jar
I am developing on VS Code version 1.37.1 on Ubuntu 18.04 LTS (VS Code says I’m running "Linux x64 4.15.0-58-generic). I am using version 1.10.0 of the SonarLint plugin, although I’ve experienced this exact same issue with versions 1.09.0 and 1.08.0.
I am able to connect to the server fine and update the SonarLint binding. The problem comes when trying to actually scanning files. I consistently get the following error:
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.073s
INFO: Final Memory: 8M/188M
INFO: ------------------------------------------------------------------------
ERROR: Error executing SonarLint
ERROR: Unable to analyse file: /home/***file name redacted to protect the innocent***.js
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarLint with the -e switch.
ERROR: Re-run SonarLint using the -X switch to enable full debug logging.
I followed the instructions to enable SonarLint output for VS Code, here’s the output:
Analysis triggered on file:///***nothing to see here***.js with configuration:
[
baseDir: /home/***wouldn't you like to know***
extraProperties: {}
excludedRules: []
includedRules: []
inputFiles: [
file:///home/***still not telling***.js (UTF-8) [js]
]
]
Available languages:
* PHP => "php"
* Python => "py"
* TypeScript => "ts"
* HTML => "web"
* JSP => "jsp"
* JavaScript => "js"
Start analysis
Declared extensions of language PHP were converted to php: **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
Declared extensions of language Python were converted to py: **/*.py
Declared extensions of language TypeScript were converted to ts: **/*.ts,**/*.tsx
Declared extensions of language HTML were converted to web: **/*.html,**/*.xhtml,**/*.cshtml,**/*.vbhtml,**/*.aspx,**/*.ascx,**/*.rhtml,**/*.erb,**/*.shtm,**/*.shtml
Declared extensions of language JSP were converted to jsp: **/*.jsp,**/*.jspf,**/*.jspx
Declared extensions of language JavaScript were converted to js: **/*.js,**/*.jsx,**/*.vue
[Info - 2:55:10 PM] Index files
Language of file 'file:///home/***something***.js' is set to 'js'
[Info - 2:55:10 PM] 1 file indexed
'PHP sensor' skipped because there is no related file in current project
'Analyzer for "php.ini" files' skipped because there is no related file in current project
'Python Squid Sensor' skipped because there is no related file in current project
'Contextual SonarTS' skipped because there is no related file in current project
Execute Sensor: HTML
Execute Sensor: SonarJS
[Info - 2:55:10 PM] 1 source files to be analyzed
[Info - 2:55:10 PM] 1/1 source files have been analyzed
Execute Sensor: ESLint-based SonarJS
SonarJS eslint-bridge server is up, no need to start.
[Info - 2:55:10 PM] 1 source files to be analyzed
Aug 22, 2019 2:55:10 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 10
[Info - 2:55:10 PM] 1/1 source files have been analyzed
I’ve looked around for instructions on how to “re-run SonarLint with the -e switch” or “Re-run SonarLint using the -X switch” but have come up empty. I would greatly appreciate some assistance on this issue, at the very least how to get a more meaningful stack trace.