I have a project which creates a plugin. In that we are using other multiple modules which we created, and I want to build only plugin module while analyzing SonarQube, But I am unable to build/scan only plugin module.
Please assist here, how we can scan/analyze only one module.
As you did not post the version of SonarQube that you are using, I can’t give you the exact link. The posted link is to the latest version. You can change this easily in the dropdown in the sidebar.
By default everything that is built will be analyzed. So, in order to make sure only your project is analyzed, you should set up the solution in a way that only the project you want to analyze is built.
This could be achieved by referencing the binaries instead of having project references to the other projects.
If you do not want to go down this path, an other option is to use exclusions. You can find more details about it here (just as cwata suggested)
A third option for you is to put <SonarQubeExclude>true</SonarQubeExclude> into the project files that you do not want to analyze.