I installed SonarLint and added some lines to a typescript file to attempt to see some sonar lint annotations. I tried adding the following lines to a method:
const password = ‘abcde’;
alert(‘hello’);
No annotations were added. Any help or pointers on where to get more details would be helpful
In the SonarLint output it seems to get to (see full output below)
[Info - 17:57:23] Started SonarTS Analysis
but there is no following Finished SonarTS Analysis
I attempted to explicitly set a javaHome in my user settings:
{
“gitlens.advanced.messages”: {
“suppressShowKeyBindingsNotice”: true
},
“gitlens.keymap”: “alternate”,
“typescript.updateImportsOnFileMove.enabled”: “always”,
“sonarlint.ls.javaHome”: “C:\Program Files\Java\jdk1.8.0_131”
}
SonarLint version: 1.4.0
I am also separately using SonarLint for Eclipse (but whether or not eclipse is running makes no difference)
Other Extentions:
danwahlin.angular2-snippets (1.0.19)
GitLens (8.5.4)
TSLint (1.0.34)
- Full Output
Starting standalone SonarLint engine…
Using 4 analyzers
Create : C:\Users\evan.sonarlint\plugins
Plugin cache: C:\Users\evan.sonarlint\plugins
Create : C:\Users\evan.sonarlint\plugins_tmp
Load plugins
Load plugins (done) | time=18ms
Plugins:
-
SonarPHP 2.13.0.3107 (php)
-
SonarPython 1.10.0.2131 (python)
-
SonarTS 1.7.0.2893 (typescript)
-
SonarJS 4.1.0.6085 (javascript)
[Info - 17:57:16] Starting SonarTS Server
Deploying bundle to C:\Users\evan.sonarlint\work.sonartmp_6828073269640753934\3037009898678434746
[Info - 17:57:23] Using typescript at [C:\Users\evan\node_modules\typescript], version 2.3.4
[Info - 17:57:23] SonarTS Server is started
[Info - 17:57:23] SonarTS Server connected to 58741
Standalone SonarLint engine started
Analysis triggered on file:///.component.ts with configuration:
[
baseDir: c:<redacted>
workDir: c:<redacted>.sonarlint
extraProperties: {}
excludedRules: []
includedRules: []
inputFiles: [
c:<redacted>.component.ts (UTF-8) [ts]
]
]
Available languages:
-
PHP => “php”
-
Python => “py”
-
TypeScript => “ts”
-
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 JavaScript were converted to js: /*.js,/.jsx,**/.vue
[Info - 17:57:23] Index files
Language of file ‘file:///c:/.component.ts’ is set to ‘ts’
Setting filesystem encoding: UTF-8
[Info - 17:57:23] 1 files 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
‘Import of TSLint issues’ skipped because one of the required properties is missing
‘Import of ESLint issues’ skipped because one of the required properties is missing
Execute Sensor: Contextual SonarTS
[Info - 17:57:23] Started SonarTS Analysis