sonar.language ignored

679 views
Skip to first unread message

vincent...@gmail.com

unread,
Mar 9, 2018, 5:56:04 PM3/9/18
to SonarLint
System:
Eclipse client with SonarLint 3.3.1
SonarQube 7.0

Despite passing sonar.language in the Sonarlint analyzer properties, regardless of the language passed the analysis still loads all languages and profiles.

See full log below from sonarlint analysis.


Trigger: EDITOR_OPEN
SonarLint analysis of file ********.sql...
Connected mode (using configuration of '***.*****' in server 'SONAR_*****')
Starting analysis with configuration:
[
  moduleKey
: **.**.***
  baseDir
: ******
  workDir
: *****\org.sonarlint.eclipse.core
  extraProperties
: {sonar.language=plsql}
  inputFiles
: [
   
***/***.sql (UTF-8)
  ]
]

Available languages:
  * Java => "java"
  * TypeScript => "ts"
  * JavaScript => "js"
  * PL/SQL => "plsql"
Starting SonarTS Server
Deploying bundle from `/sonarts-bundle.zip` to `C:\*****************\org.sonarlint.eclipse.core\.sonartmp\1157998150222517492`
No value provided by SonarLint for TypeScript location; property sonar.typescript.internal.typescriptLocation is missing
Failed to start SonarTS Server
java.io.IOException: Cannot run program "node": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source) ~[na:1.8.0_101]
    at org.sonar.plugin.typescript.ContextualServer.startSonarTSServer(ContextualServer.java:106) [sonar-typescript-plugin-1.5.0.2122.jar:na]
    at org.sonar.plugin.typescript.ContextualServer.start(ContextualServer.java:82) [sonar-typescript-plugin-1.5.0.2122.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101]
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.container.ComponentContainer$1.start(ComponentContainer.java:279) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.picocontainer.behaviors.Stored.start(Stored.java:110) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:124) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:110) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.container.storage.StorageAnalyzer.analyze(StorageAnalyzer.java:74) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.container.storage.StorageContainerHandler.analyze(StorageContainerHandler.java:69) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$analyze$0(ConnectedSonarLintEngineImpl.java:154) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:338) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:328) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:152) [org.sonarsource.sonarlint.core.sonarlint-core_3.0.1.1181.jar:na]
    at org.sonarlint.eclipse.core.internal.server.Server.runAnalysis(Server.java:275) ~[na:na]
    at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.run(AnalyzeProjectJob.java:426) ~[na:na]
    at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.runAnalysisAndUpdateMarkers(AnalyzeProjectJob.java:182) ~[na:na]
    at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.doRun(AnalyzeProjectJob.java:143) ~[na:na]
    at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.runInWorkspace(AbstractSonarProjectJob.java:43) ~[na:na]
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) ~[na:na]
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) ~[na:na]
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method) ~[na:1.8.0_101]
    at java.lang.ProcessImpl.<init>(Unknown Source) ~[na:1.8.0_101]
    at java.lang.ProcessImpl.start(Unknown Source) ~[na:1.8.0_101]
    ... 32 common frames omitted

Start analysis
Declared extensions of language Java were converted to java: **/
*.java,**/*.jav
Declared extensions of language TypeScript were converted to ts: **/
*.ts,**/*.tsx
Declared extensions of language JavaScript were converted to js: **/
*.js,**/*.jsx,**/*.vue
Declared extensions of language PL/SQL were converted to plsql: **/*.sql,**/*.pks,**/*.pkb,**/*.pks,**/*.pkb
Quality profiles:
  * java: ******* (295 rules)
  * js: ******* (82 rules)
  * plsql: ******* (112 rules)
  * ts: ******* (42 rules)
Index files
Included sources:
  **/
*.sql
Excluded sources:
 
**/*.java
  **/
*.js
Excluded tests:
 
**/*.java
Language of file 'file:/C:/*******/
****.sql' is detected to be 'plsql'
Setting filesystem encoding: UTF-8
1 files indexed
'
JavaSquidSensor' skipped because there is no related file in current project
'
SonarJS' skipped because there is no related file in current project
Execute Sensor: SonarJavaXmlFileSensor
Execute Sensor: PL/SQL Sensor
1 source files to be analyzed
1/1 source files have been analyzed
SonarTS Server was already stopped
Found 16 issue(s)
Done in 3923 ms



Julien HENRY

unread,
Mar 12, 2018, 8:52:06 AM3/12/18
to vincent...@gmail.com, SonarLint
Hi Vincent,

sonar.language is not recognized by SonarLint (and deprecated long time ago in SonarQube). SonarLint for Eclipse 3.4 + SonarTS 1.6 will fix your error.

++

Julien Henry | SonarSource

Developer

https://sonarsource.com


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/adcb8d0c-365e-4cfd-a3b3-414fd751ea78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Julien HENRY

unread,
Mar 13, 2018, 5:29:11 AM3/13/18
to vincent...@gmail.com, SonarLint
My mistake. I was sure it was deprecated in favor of using file inclusions/exclusions.

Julien Henry | SonarSource

Developer

https://sonarsource.com


2018-03-12 15:08 GMT+01:00 <vincent...@gmail.com>:
Hi Julien -

Thanks for your response.
On the SonarQube site at https://docs.sonarqube.org/display/SONAR/Analysis+Parameters#AnalysisParameters-ProjectConfiguration.1 , it does not indicate sonar.language is deprecated.
Furthermore, when running analysis through maven with the sonar.language property, it indicates in the console:
[INFO] Language is forced to plsql
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages