How to use PMD with sonarqube

1.7k views Asked by At

Hello I am new with Sonarqube and I want to add PMD and checkstyle to my sonarqube. How to do that?

I have created new custom quality profile in sonarqube and after that selected pmd and check-style but in that rules column.

It is showing 0 rule so when I am built project its no showing anything except success. so I don't know where I am making a mistake. I have downloaded plugins for both but they're not working. I am uploading wrong pmd check-style files or anything else?

Image showing file to be uploaded but which file should I upload? .xml file ?

1

There are 1 answers

0
G. Ann - SonarSource Team On

You say you've installed the SonarQube PMD and Checkstyle plugins. Good.

You also mention that you've created a new custom quality profile. You'll need to either set it to be the default profile or specifically assign your project to use it during analysis.

Your question seems to hint that you'd like to upload pre-run reports from Checkstyle and PMD. Reuse reports mode is not available for either of those tools. Instead, you'll need to activate the relevant rules in your Quality Profile and run an analysis.