unzip the zip file from step #2 to location of choice and make a note of that location. This is the value for : apexPMD.pmdPath
In VSCode, Open Preferences: User Settings and set apexPMD.pmdPath to folder where pmd was unzipped in step 3 along with other config items as shown below:
Sample Configuration -> VSCode::Preferences: User Settings
{
// ...
// absolute path to where PMD was installed
// following example in my case
"apexPMD.pmdPath":"/Users/mchinnappan/code-scan-tools/pmd/pmd-bin-5.8.1",
// Set to false to use you own ruleset (set path)
"apexPMD.useDefaultRuleset": "true",
// Absolute path to ruleset xml file. Must also set `useDefaultRuleset:false`.
"apexPMD.rulesetPath": "",
// Will run static analysis every time a file is opened
"apexPMD.runOnFileOpen": "true",
// Will run static analysis every time a file is saved
"apexPMD.runOnFileSave": "true",
// Determines at what priority level 'errors' will be added. Anything less will be a warning or hint
"apexPMD.priorityErrorThreshold": "1",
// Determines at what priority level 'warnings' will be added. Anything less will be a hint
"apexPMD.priorityWarnThreshold": "3"
}