Skip to content

Instantly share code, notes, and snippets.

@rahulmalhotra
Last active December 17, 2017 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulmalhotra/93d2f813445ff69b84ac6293e9c615a9 to your computer and use it in GitHub Desktop.
Save rahulmalhotra/93d2f813445ff69b84ac6293e9c615a9 to your computer and use it in GitHub Desktop.
Ruleset file with custom rules for pmd
<?xml version="1.0"?>
<ruleset name="Custom Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>
My Custom rules
</description>
<!-- Using a single rule from a set of predefined rules -->
<rule ref="category/apex/bestpractices.xml/AvoidLogicInTrigger" />
<!-- Using whole set of predefined rules -->
<rule ref="category/apex/errorprone.xml" />
<!-- Using whole set of rules excluding some -->
<rule ref="category/apex/codestyle.xml">
<exclude name="WhileLoopsMustUseBraces"/>
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment