简体   繁体   中英

SonarQube: check for Java code block duplications even before merging to master

We are using SonarQube Developer Edition Version 8.2 (build 32929) for our Java project and passing metric for duplication, test coverage is set at x%. Now for a git pull request actual metric is below this set limit, the jenkins build goes fine. But after merging into master, it is checking for the same metric against the entire code and build apparently fails.

I am looking for a way to check my code in the pull request itself against the entire master branch for possible duplications, coverage, etc. way in advance and not wait for a surprise until my build fails after merging.

Any ideas are appreciated. Thank you.

You can add sonarlint plugin in your IDE and verify it before committing your changes in local. It would help to fix bugs before commit.

I agree whit the last answer. If you have a big project, you can verify all modified files by sonarlint plugin.

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