简体   繁体   中英

Sonarqube analysis for selected modules

I have a multimodules project with many dependencies. Until now after successful build I was performing sonar analysis of whole project. To save time and build project I detect which modules have been changed and run maven command:

mvn install -pl module1,module5,module2 -amd

Is there any way to do static analysis only for built modules? Something like mvn sonar:sonar -pl module1,module5,module2 -amd? of course it doesn't work, do you have any idea?

I know that there is option:

mvn sonar:sonar -pl !module2 

but my project has more than 50 modules so if commit change only 5 modules I will have to list 45 others modules.

SonarQube always requires full scan. If you exclude some modules and execute the scanner, then excluded modules will disappear from SonarQube. It means there is no such flag.

Read more: How to analyse only new added lines of code?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM