-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added static code analysis / PMD (#201)
* Fixes #149 by adding PMD through sfdx-scanner * Apologizing to prettier by correctly running pmd-ruleset.xml through * Correcting debug statement ordering - LoggingLevel comes first! * Adding SFDX prior to running scanner * Removing unused line as per @jongpie's feedback
- Loading branch information
1 parent
07d82af
commit de176f8
Showing
23 changed files
with
130 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" ?> | ||
<ruleset | ||
name="Nebula Logger 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 https://pmd.sourceforge.io/ruleset_2_0_0.xsd" | ||
> | ||
<description> | ||
Nebula Logger custom PMD ruleset | ||
</description> | ||
<rule ref="category/apex/bestpractices.xml"> | ||
<exclude name="ApexAssertionsShouldIncludeMessage" /> | ||
<exclude name="AvoidGlobalModifier" /> | ||
<exclude name="AvoidLogicInTrigger" /> | ||
</rule> | ||
<rule ref="category/apex/codestyle.xml"> | ||
<exclude name="FieldNamingConventions" /> | ||
<exclude name="MethodNamingConventions" /> | ||
<exclude name="PropertyNamingConventions" /> | ||
<exclude name="VariableNamingConventions" /> | ||
</rule> | ||
<rule ref="category/apex/design.xml"> | ||
<exclude name="AvoidDeeplyNestedIfStmts" /> | ||
<exclude name="CognitiveComplexity" /> | ||
<exclude name="CyclomaticComplexity" /> | ||
<exclude name="ExcessiveClassLength" /> | ||
<exclude name="ExcessiveParameterList" /> | ||
<exclude name="ExcessivePublicCount" /> | ||
<exclude name="NcssConstructorCount" /> | ||
<exclude name="NcssMethodCount" /> | ||
<exclude name="StdCyclomaticComplexity" /> | ||
<exclude name="TooManyFields" /> | ||
</rule> | ||
<rule ref="category/apex/documentation.xml"> | ||
<exclude name="ApexDoc" /> | ||
</rule> | ||
<rule ref="category/apex/errorprone.xml"> | ||
<exclude name="EmptyStatementBlock" /> | ||
</rule> | ||
<rule ref="category/apex/performance.xml"> | ||
<exclude name="AvoidDebugStatements" /> | ||
</rule> | ||
<rule ref="category/apex/security.xml"> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ private class Logger_Tests_InboundEmailHandler { | |
Messaging.InboundEmail email = new Messaging.InboundEmail(); | ||
email.plainTextBody = 'Example email content'; | ||
email.fromAddress = '[email protected]'; | ||
String contactEmail = '[email protected]'; | ||
email.subject = 'My example email'; | ||
|
||
// Create an instance of the example handler class | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ private class Logger_Tests_InboundEmailHandler { | |
Messaging.InboundEmail email = new Messaging.InboundEmail(); | ||
email.plainTextBody = 'Example email content'; | ||
email.fromAddress = '[email protected]'; | ||
String contactEmail = '[email protected]'; | ||
email.subject = 'My example email'; | ||
|
||
// Create an instance of the example handler class | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.