SonarLint in CLion with new Resharper engine does not analyze C file: "compiler kind not found"

Please provide

  • Operating system: Ubuntu 22
  • SonarLint plugin version: 10.6.2.78685
  • Programming language you’re coding in: C
  • Is connected mode used: No
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:

When the ReSharper C++ language engine is enabled, Sonarlint does not analyze C files anymore.

A simple hello world:

#include <stdio.h>

// c:S929 Functions without parameters should be declared with parameter type "void"
int main() {
    printf("Hello world\n");
    return 0;
}

Produces on manual start:

Running CFamily analysis configurator for Resharper
 [2024-06-12T10:26:06.772] [SonarLint Server RPC sequential executor] DEBUG sonarlint - No connections configured, skipping binding suggestions.
 [2024-06-12T10:26:06.772] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Synchronizing new configuration scopes: [SonarTest]
 [2024-06-12T10:26:06.772] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Creating container for module 'SonarTest'
Analysis became ready=true for [SonarTest]
0 entries removed from the store
0 entries removed from the store
 [2024-06-12T10:26:07.665] [SonarLint Server RPC sequential executor] DEBUG sonarlint - No connections configured, skipping binding suggestions.
 [2024-06-12T10:26:07.666] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Synchronizing new configuration scopes: [/home/marc/SonarTest/.idea/misc.xml]
Analysis became ready=true for [/home/marc/SonarTest/.idea/misc.xml]
Trigger: CURRENT_FILE_ACTION
[CURRENT_FILE_ACTION] 1 file(s) submitted
File 'hello.c' excluded: compiler kind not found

Analysis works fine with C++ code and works fine with the standard language engine.

Hello, welcome to the community! And thanks for reporting this.

I managed to reproduce the issue and created a ticket to investigate why the IntelliJ platform is not reporting the compiler configuration in such a setup.

In the meantime, disabling the ReSharper engine may be an acceptable workaround.