How do I run a PMD in intelliJ?

How do I run a PMD in intelliJ?

PMD is a static source code analysis software. It detects errors like superfluous variables, empty catch blocks, and the creation of needless objects, among others. Although it concentrates on Java and Apex, it also supports six additional languages.

You can integrate this plugin with any IDE you are using for developement. To Add this in IntelliJ , Click Setting->Plugin , Search for PMD and Click Install.

Then you have to setup the rule xml file in to path and you can run this scan as Maven Goal.