SonarLint with Clion: unsupported compiler MSVC

After analyzing a file using the SonarLint for CLion plugin, it will never report any issues. I can reproduce this issue on the default “Hello world!” project created by CLion. Any help on what I might be missing to get the plugin working would be appreciated.

IDE: CLion 2021.1.1
Operative System: Windows 10 Pro 20H2
Compiler: Visual Studio 15.9.36
Using connected mode? No
Log with Verbose output and Analysis logs enabled:

Server started on 64120
File 'CMakeLists.txt' excluded: FILE not an OCPsiFile
File 'main.cpp' excluded: unsupported compiler MSVC
Trigger: EDITOR_OPEN
[Editor open] 0 file(s) submitted
File 'main.cpp' excluded: unsupported compiler MSVC
Trigger: ACTION
[Action] 0 file(s) submitted
Couldn't get a connected engine to check for update: Project is not bound to a SonarQube project
Found plugin: sonar-cfamily-plugin-6.20.0.31240.jar
Found plugin: sonar-html-plugin-3.4.0.2754.jar
Found plugin: sonar-java-plugin-6.15.1.26025.jar
Found plugin: sonar-javascript-plugin-7.4.2.15501.jar
Found plugin: sonar-kotlin-plugin-1.8.3.2219.jar
Found plugin: sonar-php-plugin-3.17.0.7439.jar
Found plugin: sonar-python-plugin-3.4.1.8066.jar
Found plugin: sonar-ruby-plugin-1.8.3.2219.jar
Create : C:\Users\jose.ortiz\AppData\Roaming\JetBrains\CLion2021.1\sonarlint\plugins
Plugin cache: C:\Users\jose.ortiz\AppData\Roaming\JetBrains\CLion2021.1\sonarlint\plugins
Create : C:\Users\jose.ortiz\AppData\Roaming\JetBrains\CLion2021.1\sonarlint\plugins\_tmp
Load plugins
Plugin 'HTML Code Quality and Security' is excluded because none of languages 'HTML,JSP' are enabled. Skip loading it.
Plugin 'Java Code Quality and Security' is excluded because language 'Java' is not enabled. Skip loading it.
Plugin 'JavaScript/TypeScript Code Quality and Security' is excluded because none of languages 'JavaScript,TypeScript' are enabled. Skip loading it.
Plugin 'Kotlin Code Quality and Security' is excluded because language 'Kotlin' is not enabled. Skip loading it.
Plugin 'PHP Code Quality and Security' is excluded because language 'PHP' is not enabled. Skip loading it.
Plugin 'Python Code Quality and Security' is excluded because language 'Python' is not enabled. Skip loading it.
Plugin 'Ruby Code Quality and Security' is excluded because language 'Ruby' is not enabled. Skip loading it.
Load plugins (done) | time=35ms
Plugins:
  * CFamily Code Quality and Security 6.20.0.31240 (cpp)
File 'main.cpp' excluded: unsupported compiler MSVC
Trigger: ACTION
[Action] 0 file(s) submitted
1 Like

:+1: came to ask the same question.

Hi @joseasoler @wrenoud ,

at the time being SonarLint for CLion supports only GCC and Clang compilers. We are going to add support for MSVC in the upcoming future but there is no ETA yet, you can follow the related ticket SLI-545.

1 Like

Hi @mpaladin, thank you for your answer. I will follow the ticket and give SonarLint another try after It is implemented.

1 Like

@mpaladin Thanks! I will follow the ticket.

Additionally I attempted several variants on windows. clang-cl is also marked as unsupported, and I get errors with gcc+WLS2 because it tries to use the windows filesystem. Is there anything you’d like me to do with that information?

Hi @wrenoud ,

we have a ticket for that: SLI-530.

For WSL we are going to add support for it, I do have a poc for that but no ETA yet.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.