How to create custom rules for PMD Apex static code analyzer?

How can I create custom rules for PMD? For example, if I want to create a rule to say ‘all code should be in allman style and therefore, any line with { should be the only character on the line’, how can I do this?

I have the same questions as are asked on this link – I saw this video – – and I can see the designer.bat file, although I don’t see a UI appear. But even so, it doesn’t tell me how I can create a custom rule specifically.

Does anyone have a step by step process on how to create a new rule for Apex PMD?



Source : Link , Question Author : Andy Hitchings , Answer Author : Community

Leave a Comment