I am working on a Java project and looking to deploy SonarQube on every PR also on our feature branches (not just main) as part of our shift-left strategy. However, we don't want to have to compile Java code every time. Is it possible to run Sonarqube pull request analysis without having compiled java code?
I looked at SQ docs and could not find specifics on how pull request analysis works: https://docs.sonarqube.org/9.7/analyzing-source-code/pull-request-analysis/
Also, looking at other docs, Sonarqube says (https://docs.sonarqube.org/latest/analyzing-source-code/languages/java/)
Java analysis and bytecode Compiled .class files are required for java projects with more than one java file. If not provided properly, analysis will fail with the message:
Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.