SonarLint crashes due to IllegalArgumentException

Hello,

I’m trying to use SonarLint in Eclipse with a project bound to a sonarqube server.

We use C/C++ Plugin.

When I add the property “sonar.cfamily.build-wrapper-output.bypass=true” in the configuration of SonarLint (Eclipse), I have the following exception:
Error during execution of SonarLint analysis
java.lang.IllegalArgumentException: “sonar.cfamily.build-wrapper-output” and “sonar.cfamily.build-wrapper-output.bypass” properties cannot be specified at the same time.

I wonder how does SonarLint get “sonar.cfamily.build-wrapper-output” property.

I checked that “sonar.cfamily.build-wrapper-output” is neither set in project config nor in global config (in Eclipse).
I previously tried the build wrapper in this project but I removed all related configurations.

Is there a way to find where does this property come from ?
Is there some verbose logs ?
Is this property pulled from the server ?
Maybe SonarLint cached some properties ?

Is it recommended to use SonarLint with build wrapper ?

Your help is welcome.

Hello @SHa,

To analyze C or C++ code, we need to get the configuration that is used to build the code. When you run an independent analysis (SonarQube :sonarqube: or SonarCloud :sonarcloud:), we ask you to use build-wrapper to record this information.

However, with SonarLint :sonarlint:, since we are integrated into an IDE (in your case, Eclipse), we can query this IDE to get all the information that is needed. But we still use the build-wrapper channels to transfer this information to the analyzer.

This means two things:

  • Inside of SonarLint, you don’t have to care about build-wrapper related configuration, it is already handled for you
  • Inside of SonarLint, you should not mess with build-wrapper related configuration, it will just disturb the existing mechanisms :slight_smile:

Hope this clarifies the situation…

Finally this issue is linked to this one:
https://community.sonarsource.com/t/parse-error-in-header-file-with-build-wrapper/3134

I was not aware that SonarLint is fully integrated to CDT.

Is there some documentation that explain what you tell me in your answer ?

Thanks