CLion support for SonarLint

Would be great to have a C++ static analyzer in SonarLint plugin for CLion IDE.


Hello, thank you for your feedback.

CLion looks indeed like a nice contender for integration with our C and C++ analyzers.

Our current stance (2020Q1) is focused on consolidating SonarLint’s UX for what we measured as the most popular IDE/language associations, and unfortunately CLion is currently not on our short term roadmap.

However, given its rising popularity, we might consider it for the medium/long term roadmap, to raise adoption across the JetBrains range of IDEs. In the meantime, SonarLint can still be installed on CLion to benefit from our currently supported languages.

We’ll make sure that this post is updated when CLion appears on the product roadmap.

@JBL_SonarSource Hi, we’re a company of heavy CLion users and would be very happy to see this added to our workflow!

Let us know if there is anything we can do to help accelerate this work.

1 Like

Hello, thank you for the ping!

For the moment, our C++ analyzer is supported only by SonarLint for Visual Studio and Eclipse.

I’d like to seize this opportunity to learn a bit more about our CLion user base, if that’s OK for you :slight_smile: e.g:

  • What are your development and target platforms?
  • Which compiler(s)/toolchain(s) are you using?
  • Have you tried CLion’s built-in inspections and/or clang-tidy support?

So, to answer the questions:

  1. We target almost exclusively Linux using Centos. We use Qt heavily as a UI framework.
  2. Only gcc as of now.
  3. Yes, we are using those. But sonarlint/sonarqube covers more/different things.

The eclipse integration has been used before within the company, but eclipse is quite far behind in usability versus both QtCreator and CLion from what we’ve experienced. Visual Studio is not really an option as the whole company is on Linux almost.

1 Like

Keen to see this!

  • Development platforms: Both Windows 10 and Linux (Fedora)
  • Target platforms: Windows 10/server, Fedora/Redhat, Ubuntu
  • Compilers: GCC, MSVC via CMAKE (and Ninja on Windows)

Have we used built-in inspectors: yes, but we find more via Sonar (otherwise we woudn’t be using it :slight_smile: ). However, the iteration time is much longer to fix Sonar issues. Fix, compile, test, analyze, submit, go to website, find the code, check fixed. Sometimes fixing one issue results in another, causing another iteration of the above

  • What are your development and target platforms?
    Windows/Linux Development
    ARM Embedded Target
  • Which compiler(s)/toolchain(s) are you using?
    Clion with Makefile and openODC
  • Have you tried CLion’s built-in inspections and/or clang-tidy support?
    Yes, but sonarqube is stronger :slight_smile:

Would love to see this!

Hello @seghcder and @JSStabl ,
thanks for sharing! On our side, we would like to also share some good news: the SonarLint team is currently working on a first MMF to support C and C++ analysis in CLion. Feel free to follow it here :slight_smile: The first release we will focus on supporting GCC and Clang.
We will post one more update as soon as we have it working!


Sweet! Do you have an ETA for a first beta?

You can expect an update within the next few weeks :wink:

1 Like

Hello everyone here,
I am happy to announce that the support for CLion is now available ! :partying_face: We just released a new version of :sonarlint: that brings the C and C++ analysis in CLion, you can see the details here.

At SonarSource, we hope you will enjoy it, and we would be glad to hear your feedback! Don’t hesitate to share with us what you think of this new version here.


2 posts were split to a new topic: SonarLint for CLion doesn’t work with WSL under windows