Kiran,
Go to Window > Preferences > PMD > Rule configuration > Select (check) all the rules using “Check all rules button” > Click on Apply and then click on Ok. (Take a look at the attached screenshot for reference)
Right click on your project in package explorer and click PMD > Check code to see the errors in violations overview and violations outline views.

Let us know how it works for you.