Scanner command used when applicable (private details masked)
Languages of the repository Java
Error observed ``` ERROR Cannot analyse 'data/src/main/java/**//DataModules.kt’ with ‘KtChecksVisitor’: Expected unresolved ErrorType but UNAVAILABLE_TYPE_FOR_DECLARATION found for [Error type: Type is unavailable for declaration FUN]
From the logs I can see that you analyze your project using scanner cli. For the JVM based projects if they’re using Maven or Gradle, we recommend to used scanners for Maven or Gradle. If this is your case, could you please try analyzing the project with the specific scanner.
A few side notes:
To analyze Jvm-based languages properly, Sonar analysis needs classpath. Maven/Gradle plugins set them automatically, for SonarScanner you need to set classpath manualy.
If classpath (sonar.java.binaries) is not set Java Sensor will fail.
I don’t see Java Sensor in the logs, so looks like you don’t actually analyze your Java files.
I also see many excluded sources (probably all Java sources)
About your issue:
Looks like it might happen because your project is misconfigured. To solve this either use scanners for Maven/Gradle. If you can’t use them, please, make sure you provide properties (sonar.java.binaries and sonar.java.libraries), so the analyzer can pick up the classpath. And get back to me with the results.
Meanwhile, I will have a look at your source file, maybe I will be able to reproduce the issue, if there’s indeed a bug there.