Closed csrvsk closed 1 year ago
Hi,
It doesn't work because SonarLint doesn't allow it. SonarLint is locked to the official SonarQube plugins:
https://community.sonarsource.com/t/frequently-asked-questions/7204
Why are some issues reported by SonarQube/SonarCloud, but not in SonarLint (even with connected mode)?
Third-party analyzers are not executed in SonarLint Some issues may be reported in SonarQube by a plugin leveraging a third-party analyzer (PMD, Checkstyle, ESLint, PyLint, …). SonarLint will only run rules from SonarSource analyzers including custom rules extending SonarSource analyzers.
I have added sonarlint extension to VS Code & IntelliJ. I have added SonarQube connection to run SonarLint in connected mode. But surprisingly it is not showing any issues identified by ZPA PlSql plugin on VS Code as it was showing on SonarQube.
Executing c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\jre\17.0.8-win32-x86_64.tar\bin\java -jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\server\sonarlint-ls.jar -stdio -analyzers c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonargo.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonarjava.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonarjs.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonarphp.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonarpython.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonarhtml.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonarxml.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonarcfamily.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonartext.jar c:\Users\.vscode\extensions\sonarsource.sonarlint-vscode-3.21.0-win32-x64\analyzers\sonariac.jar [Info - 12:46:03.883] Started embedded server on port 64121
Not sure what is the issue. Please advise how to fix this.
Following logs of sonarlint runtime on VS Code might be useful in understanding my issue.
[Info - 12:50:18.831] Downloaded plugin list in 24ms [Info - 12:50:18.833] [SYNC] Downloading plugin 'codehawk-1.6.jar' [Info - 12:50:19.691] Downloaded 'codehawk' in 856ms [Info - 12:50:19.691] [SYNC] Downloading plugin 'sonar-java-plugin-7.16.0.30901.jar' [Info - 12:50:21.557] Downloaded 'java' in 1866ms [Info - 12:50:21.557] [SYNC] Downloading plugin 'MyCompanyCustomRulesPlugin-1.0.jar' [Info - 12:50:21.617] Downloaded 'javacustom' in 60ms [Info - 12:50:21.618] [SYNC] Downloading plugin 'sonar-php-plugin-3.27.1.9352.jar' [Info - 12:50:22.150] Downloaded 'php' in 532ms [Info - 12:50:22.150] [SYNC] Downloading plugin 'sonar-python-plugin-3.24.0.10784.jar' [Info - 12:50:22.892] Downloaded 'python' in 741ms [Info - 12:50:22.893] [SYNC] Synchronizing analyzer configuration for project 'V12_BI' [Info - 12:50:22.951] Downloaded settings in 54ms
[Info - 12:50:22.951] Downloaded settings in 54ms [Info - 12:50:23.003] [SYNC] Fetching rule set for language 'cloudformation' from profile 'AYHZHNYOpdSQS0Eu3u-3' [Info - 12:50:23.103] [SYNC] Fetching rule set for language 'css' from profile 'AYJ-NBvc5RmaSVFwpJbH' [Info - 12:50:23.162] [SYNC] Fetching rule set for language 'docker' from profile 'AYfzPsqvq4SJQ_nLZgum' [Info - 12:50:23.193] [SYNC] Fetching rule set for language 'go' from profile 'AYHZHKEmpdSQS0Eu3snm' [Info - 12:50:23.218] [SYNC] Fetching rule set for language 'java' from profile 'AYezyHjo0_JI-HeNkYTc' [Info - 12:50:23.409] [SYNC] Fetching rule set for language 'js' from profile 'AYl6ewoXsJK8Q__SgMiq' [Info - 12:50:23.538] [SYNC] Fetching rule set for language 'kubernetes' from profile 'AYfzPodjq4SJQ_nLZgkR' [Info - 12:50:23.561] [SYNC] Fetching rule set for language 'php' from profile 'AYHZHMprpdSQS0Eu3uwo' [Info - 12:50:23.656] [SYNC] Fetching rule set for language 'py' from profile 'AYHZHKgGpdSQS0Eu3s2g' [Info - 12:50:23.775] [SYNC] Fetching rule set for language 'secrets' from profile 'AYfzPvnzq4SJQ_nLZg0g' [Info - 12:50:23.797] [SYNC] Fetching rule set for language 'terraform' from profile 'AYHZHNA1pdSQS0Eu3u3e' [Info - 12:50:23.871] [SYNC] Fetching rule set for language 'ts' from profile 'AYHZHNlEpdSQS0Eu3vFP' [Info - 12:50:23.998] [SYNC] Fetching rule set for language 'web' from profile 'AYHZHMCXpdSQS0Eu3ule' [Info - 12:50:24.030] [SYNC] Fetching rule set for language 'xml' from profile 'AYHZHMZSpdSQS0Eu3uq2' [Info - 12:50:24.065] [SYNC] Fetching rule set for language 'yaml' from profile 'AYfzTdA63YL-a0ByYWC-' [Info - 12:50:24.121] [SYNC] Synchronizing project branches for project 'V12_BI' [Warn - 12:50:24.262] Plugin 'codehawk' embeds dependencies. This will be deprecated soon. Plugin should be updated. [Info - 12:50:28.824] [SYNC] Synchronizing issues for project 'V12_BI' on branch 'master' [Info - 12:50:28.989] [SYNC] Synchronizing taint issues for project 'V12_BI' on branch 'master' [Info - 12:50:29.260] Analyzing file "file:///c:/cm32/erp/R12/Development/Trunk/V12/BI/PB/bi_classifiers.pb"... [Info - 12:50:30.661] Found 0 issues [Info - 12:50:43.351] Analyzing file "file:///c:/cm32/erp/R12/Development/Trunk/V12/BI/PB/bi_classifiers.pb"... [Info - 12:50:44.019] Found 0 issues [Info - 12:55:20.856] Analyzing file "file:///c:/cm32/erp/R12/Development/Trunk/V12/BI/PB/bi_compare.pb"... [Info - 12:55:21.648] Found 0 issues [Info - 12:55:27.565] Analyzing file "file:///c:/cm32/erp/R12/Development/Trunk/V12/BI/PB/bi_connection.pb"... [Info - 12:55:28.011] Found 0 issues [Info - 12:55:32.445] Analyzing file "file:///c:/cm32/erp/R12/Development/Trunk/V12/BI/PB/bi_datasource.pb"... [Info - 12:55:32.882] Found 0 issues [Info - 12:55:37.866] Analyzing file "file:///c:/cm32/erp/R12/Development/Trunk/V12/BI/PB/bi_dsr_schema_gen.pb"... [Info - 12:55:38.274] Found 0 issues [Info - 12:55:47.134] Analyzing file "file:///c:/cm32/erp/R12/Development/Trunk/V12/BI/PB/bi_classifiers.pb"... [Info - 12:55:47.469] Found 0 issues
I do not see loading of zpa plsql plugin here. But another custom rule plugin was loaded.
[Info - 12:50:21.557] [SYNC] Downloading plugin 'MyCompanyCustomRulesPlugin-1.0.jar' [Info - 12:50:21.617] Downloaded 'javacustom' in 60ms
I have also tried to copy the plugin jar file to vscode extensions as well
I thought this might be helpful. But no luck.
Thanks vsk