Sonarlint does not have an output tab in VSCode

I’m trying to run Sonarlint in Visual Studio Code in connected mode. Unfortunately I’m unsuccessfull. I installed the Sonarlint extension and put a sonarlint.connectedMode.connections.sonarqube setting in my user settings. When I open a project that has sonarlint.connectedMode.project set in its workspace settings, the Sonarlint extension does not have an output tab.

If I open the directory one level above though, the Sonarlint output tab appears but SonarLint apparently fails with the following log:

[Debug - 16:08:03.962] File 'file:///home/dschuessler/Developer/project/cop-backend/backend/src/organization/repository/organizationRemote.ts' closed. Cleaning diagnostics.
[Debug - 16:08:04.022] Queuing analysis of file 'file:///home/dschuessler/Developer/project/cop-backend/backend/src/organization/repository/organizationRepositoryImpl.ts'
[Info  - 16:08:04.023] Analyzing file 'file:///home/dschuessler/Developer/project/cop-backend/backend/src/organization/repository/organizationRepositoryImpl.ts'...
[Debug - 16:08:04.023] Analysis triggered on 'file:///home/dschuessler/Developer/project/cop-backend/backend/src/organization/repository/organizationRepositoryImpl.ts' with configuration: 
[
  baseDir: /home/dschuessler/Developer/project
  extraProperties: {}
  moduleKey: file:///home/dschuessler/Developer/project
  excludedRules: []
  includedRules: []
  ruleParameters: {}
  inputFiles: [
    file:///home/dschuessler/Developer/project/cop-backend/backend/src/organization/repository/organizationRepositoryImpl.ts (UTF-8) [ts]
  ]
]

[Debug - 16:08:04.031] Start analysis
[Info  - 16:08:04.032] Index files
[Debug - 16:08:04.033] Language of file 'file:///home/dschuessler/Developer/project/cop-backend/backend/src/organization/repository/organizationRepositoryImpl.ts' is set to 'TypeScript'
[Info  - 16:08:04.033] 1 file indexed
[Debug - 16:08:04.044] 'JavaSquidSensor' skipped because there is no related file in current project
[Debug - 16:08:04.044] 'PHP sensor' skipped because there is no related file in current project
[Debug - 16:08:04.044] 'Analyzer for "php.ini" files' skipped because there is no related file in current project
[Debug - 16:08:04.045] 'Python Sensor' skipped because there is no related file in current project
[Debug - 16:08:04.045] Execute Sensor: JavaXmlSensor
[Debug - 16:08:04.045] Execute Sensor: HTML
[Debug - 16:08:04.045] 'JavaScript analysis' skipped because there is no related file in current project
[Debug - 16:08:04.045] Execute Sensor: TypeScript analysis
[Debug - 16:08:04.048] eslint-bridge server is up, no need to start.
[Debug - 16:08:04.061] initializing linter with no-commented-code,sonar-no-fallthrough,new-operator-misuse,non-existent-operator,no-inverted-boolean-check,no-small-switch,file-uploads,prefer-for-of,xml-parser-xxe,default-param-last,no-global-this,no-array-delete,no-alphabetical-sort,arguments-order,no-unsafe-finally,prefer-while,no-sequences,void-use,no-octal,comma-or-logical-or-case,label-position,conditional-indentation,no-use-of-empty-return-value,session-regeneration,super-invocation,no-associative-arrays,no-weak-keys,no-try-promise,weak-ssl,no-useless-increment,no-throw-literal,no-same-line-conditional,no-redundant-optional,no-identical-functions,no-element-overwrite,no-equals-in-for-termination,no-sparse-arrays,post-message,constructor-for-side-effects,no-redundant-jump,no-redeclare,no-duplicate-imports,no-unthrown-error,no-globals-shadowing,unverified-hostname,no-collection-size-mischeck,prefer-namespace-keyword,unverified-certificate,no-empty-collection,for-loop-increment-sign,no-accessor-field-mismatch,no-unused-collection,no-invariant-returns,no-case-label-in-switch,no-return-await,no-nested-conditional,no-unnecessary-type-assertion,insecure-jwt-token,no-dead-store,prefer-type-guard,use-type-alias,no-misleading-array-reverse,no-redundant-assignments,no-in-misuse,no-parameter-reassignment,no-all-duplicated-branches,no-identical-conditions,no-weak-cipher,no-delete-var,encryption-secure-mode,updated-loop-counter,no-useless-intersection,no-empty-function,no-unsafe-negation,max-switch-cases,no-extra-semi,deprecation,misplaced-loop-counter,no-one-iteration-loop,no-multi-str,no-undefined-argument,function-inside-loop,no-labels,cognitive-complexity,use-isnan,no-shadow,no-nested-template-literals,no-duplicate-in-composite,generator-without-yield,no-caller,no-ignored-return,no-duplicated-branches,no-redundant-parentheses,call-argument-line,no-unenclosed-multiline-block,bitwise-operators,class-name,no-identical-expressions,no-redundant-boolean,no-unreachable,prefer-immediate-return,no-useless-catch,prefer-promise-shorthand,unused-import,no-nested-assignment,index-of-compare-to-positive-number,file-name-differ-from-class,no-primitive-wrappers,todo-tag,prefer-default-last,no-empty-pattern,no-gratuitous-expressions,no-self-assign,no-misused-new,no-invalid-await,fixme-tag,no-empty,max-params,no-unused-expressions
[Error - 16:08:04.068] Failure during analysis, Node.js command to start eslint-bridge was: /usr/bin/node /home/dschuessler/.sonarlint/work/.sonartmp_4622242838654422633/eslint-bridge-bundle/package/bin/server 40669 127.0.0.1 /home/dschuessler/Developer/project true true 
[Error - 16:08:04.069] java.io.UncheckedIOException: java.nio.file.AccessDeniedException: /home/dschuessler/Developer/project/cop-hd-sqlproxy/mygcloud/legacy_credentials/dschuessler@organization.de
	at java.base/java.nio.file.FileTreeIterator.fetchNextIfNeeded(Unknown Source)
	at java.base/java.nio.file.FileTreeIterator.hasNext(Unknown Source)
	at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at org.sonar.plugins.javascript.eslint.TsConfigProvider$LookupTsConfigProvider.tsconfigs(TsConfigProvider.java:111)
	at org.sonar.plugins.javascript.eslint.TsConfigProvider.tsconfigs(TsConfigProvider.java:73)
	at org.sonar.plugins.javascript.eslint.TypeScriptSensor.analyzeFiles(TypeScriptSensor.java:106)
	at org.sonar.plugins.javascript.eslint.AbstractEslintSensor.execute(AbstractEslintSensor.java:120)
	at org.sonar.plugins.javascript.eslint.TypeScriptSensor.execute(TypeScriptSensor.java:56)
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:80)
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:71)
	at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:133)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:126)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:111)
	at org.sonarsource.sonarlint.core.container.standalone.StandaloneGlobalContainer.analyze(StandaloneGlobalContainer.java:162)
	at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.lambda$analyze$0(StandaloneSonarLintEngineImpl.java:97)
	at org.sonarsource.sonarlint.core.AbstractSonarLintEngine.withModule(AbstractSonarLintEngine.java:67)
	at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.analyze(StandaloneSonarLintEngineImpl.java:95)
	at org.sonarsource.sonarlint.ls.AnalysisManager.lambda$analyzeStandalone$12(AnalysisManager.java:452)
	at org.sonarsource.sonarlint.ls.AnalysisManager.analyzeWithTiming(AnalysisManager.java:507)
	at org.sonarsource.sonarlint.ls.AnalysisManager.analyzeStandalone(AnalysisManager.java:452)
	at org.sonarsource.sonarlint.ls.AnalysisManager.analyze(AnalysisManager.java:341)
	at org.sonarsource.sonarlint.ls.AnalysisManager.lambda$analyzeAsync$4(AnalysisManager.java:295)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.AccessDeniedException: /home/dschuessler/Developer/project/cop-hd-sqlproxy/mygcloud/legacy_credentials/dschuessler@organization.de
	at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(Unknown Source)
	at java.base/java.nio.file.Files.newDirectoryStream(Unknown Source)
	at java.base/java.nio.file.FileTreeWalker.visit(Unknown Source)
	at java.base/java.nio.file.FileTreeWalker.next(Unknown Source)
	... 31 more

[Info  - 16:08:04.079] Found 0 issues

I’m not sure if this error is related to the former problem though.

In case it matters: I’m using the VSCode SSH extension, so the Sonarlint extension is installed on an Ubunutu 20.04 machine. When I was told via a notification that it misses the JRE I let it download its own JRE. The client runs on macOS 11.5.

VSCode version 1.58.2
Sonarlint extension version 2.0.0

I appreciate any help.

Hello,

Thanks for joining the community and raising this issue.

About the first part of your message, it is expected that you don’t see the Output view. The SonarLint extension gets activated only when opening a file of a supported language (e.g. TS as you did later), and only then will the Output view appear.

The error happens when trying to browse the /home/dschuessler/Developer/project/cop-hd-sqlproxy/mygcloud/legacy_credentials/dschuessler@organization.de folder. This is needed by the TS analyzer to locate the tsconfig.json file. The name of this folder looks strange to me though, is this expected ? Is there any specific permission set on this folder ?

The file being analyzed is in cop-backend while the error talks about cop-hd-sqlproxy, what is your workspace organization ? Did you open the project folder as the root folder in VSCode, or do you have 2 separate folders in a workspace ?