-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
1,576 additions
and
615 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
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 |
---|---|---|
@@ -1,78 +1,89 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="LeanStacks PMD Ruleset" xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" | ||
<ruleset name="LeanStacks PMD Ruleset" | ||
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"> | ||
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.io/ruleset_2_0_0.xsd"> | ||
|
||
<description> | ||
This is the LeanStacks Official PMD ruleset. | ||
</description> | ||
This is the LeanStacks Official PMD ruleset. | ||
</description> | ||
|
||
<!-- Use the entire 'basic' ruleset --> | ||
<rule ref="rulesets/java/basic.xml" /> | ||
<rule ref="category/java/bestpractices.xml" /> | ||
|
||
<!-- Use the entire 'clone' ruleset --> | ||
<rule ref="rulesets/java/clone.xml" /> | ||
|
||
<!-- Use the entire 'code size' ruleset --> | ||
<rule ref="rulesets/java/codesize.xml" /> | ||
|
||
<!-- Use the entire 'controversial' ruleset --> | ||
<rule ref="rulesets/java/controversial.xml"> | ||
<exclude name="AtLeastOneConstructor" /> | ||
<rule ref="category/java/codestyle.xml"> | ||
<exclude name="AtLeastOneConstructor" /> | ||
<exclude name="OnlyOneReturn" /> | ||
</rule> | ||
<rule ref="rulesets/java/controversial.xml/DataflowAnomalyAnalysis"> | ||
|
||
<rule ref="category/java/codestyle.xml/LongVariable"> | ||
<properties> | ||
<property name="violationSuppressRegex" value="^Found 'UR'-anomaly.*" /> | ||
<property name="minimum" value="35" /> | ||
</properties> | ||
</rule> | ||
|
||
<!-- Use the entire 'coupling' ruleset --> | ||
<rule ref="rulesets/java/coupling.xml"> | ||
<exclude name="LawOfDemeter" /> | ||
<exclude name="LoosePackageCoupling" /> | ||
<rule ref="category/java/codestyle.xml/ShortVariable"> | ||
<properties> | ||
<property name="minimum" value="2" /> | ||
</properties> | ||
</rule> | ||
|
||
<!-- Use the entire 'design' ruleset --> | ||
<rule ref="rulesets/java/design.xml" /> | ||
|
||
<!-- Use the entire 'empty' ruleset --> | ||
<rule ref="rulesets/java/empty.xml" /> | ||
|
||
<!-- Use the entire 'finalizers' ruleset --> | ||
<rule ref="rulesets/java/finalizers.xml" /> | ||
|
||
<!-- Use the entire 'javabeans' ruleset --> | ||
<rule ref="rulesets/java/javabeans.xml" /> | ||
|
||
<!-- Use the entire 'java logging' ruleset --> | ||
<rule ref="rulesets/java/logging-java.xml"> | ||
<!-- InvalidSlf4jMessageFormat has bug in PMD 5.5.1 --> | ||
<exclude name="InvalidSlf4jMessageFormat" /> | ||
<rule ref="category/java/codestyle.xml/ShortClassName"> | ||
<properties> | ||
<property name="minimum" value="2" /> | ||
</properties> | ||
</rule> | ||
|
||
<!-- Use the entire 'junit' ruleset --> | ||
<rule ref="rulesets/java/junit.xml" /> | ||
|
||
<!-- Use the entire 'optimizations' ruleset --> | ||
<rule ref="rulesets/java/optimizations.xml" /> | ||
|
||
<!-- Use the entire 'sun security' ruleset --> | ||
<rule ref="rulesets/java/sunsecure.xml" /> | ||
|
||
<!-- Use the entire 'strict exceptions' ruleset --> | ||
<rule ref="rulesets/java/strictexception.xml" /> | ||
|
||
<!-- Use the entire 'type resolution' ruleset --> | ||
<rule ref="rulesets/java/typeresolution.xml" /> | ||
<rule ref="category/java/codestyle.xml/ClassNamingConventions"> | ||
<properties> | ||
<property name="utilityClassPattern" value="[A-Z][a-zA-Z0-9]*" /> | ||
</properties> | ||
</rule> | ||
|
||
<!-- Use the entire 'unnecessary' ruleset --> | ||
<rule ref="rulesets/java/unnecessary.xml" /> | ||
<rule ref="category/java/codestyle.xml/FieldNamingConventions"> | ||
<properties> | ||
<property name="exclusions" value="serialVersionUID|logger" /> | ||
</properties> | ||
</rule> | ||
|
||
<!-- Use the entire 'unused code' ruleset --> | ||
<rule ref="rulesets/java/unusedcode.xml" /> | ||
<rule ref="category/java/design.xml"> | ||
<exclude name="DataClass" /> | ||
<exclude name="LawOfDemeter" /> | ||
<exclude name="LoosePackageCoupling" /> | ||
</rule> | ||
|
||
<rule ref="category/java/design.xml/SignatureDeclareThrowsException"> | ||
<properties> | ||
<property name="IgnoreJUnitCompletely" value="true" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="category/java/documentation.xml" /> | ||
|
||
<!-- Use the entire 'strings' ruleset --> | ||
<rule ref="rulesets/java/strings.xml" /> | ||
<rule ref="category/java/documentation.xml/CommentSize"> | ||
<properties> | ||
<property name="maxLineLength" value="120" /> | ||
<property name="maxLines" value="20" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="category/java/errorprone.xml" /> | ||
|
||
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals"> | ||
<properties> | ||
<property name="skipAnnotations" value="true" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="category/java/errorprone.xml/DataflowAnomalyAnalysis"> | ||
<properties> | ||
<property name="violationSuppressRegex" value="^Found 'UR'-anomaly.*" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="category/java/multithreading.xml" /> | ||
|
||
<rule ref="category/java/performance.xml" /> | ||
|
||
<rule ref="category/java/security.xml" /> | ||
|
||
</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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
HTTP/1.1 404 | ||
Content-Length: 213 | ||
Content-Type: application/json;charset=UTF-8 | ||
{ | ||
"timestamp": "2018-12-12T13:16:11.771539Z", | ||
"method": "GET", | ||
"path": "/api/...", | ||
"status": 404, | ||
"statusText": "Not Found", | ||
"exceptionClass": "java.util.NoSuchElementException", | ||
"exceptionMessage": "No value present" | ||
} | ||
---- |
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,32 @@ | ||
|=== | ||
|Path|Type|Description | ||
|
||
|`+timestamp+` | ||
|`+String+` | ||
|The time the error occurred. | ||
|
||
|`+method+` | ||
|`+String+` | ||
|The HTTP method. | ||
|
||
|`+path+` | ||
|`+String+` | ||
|The request context path. | ||
|
||
|`+status+` | ||
|`+Number+` | ||
|The response HTTP status code. | ||
|
||
|`+statusText+` | ||
|`+String+` | ||
|The response HTTP status text. | ||
|
||
|`+exceptionClass+` | ||
|`+String+` | ||
|The exception class. | ||
|
||
|`+exceptionMessage+` | ||
|`+String+` | ||
|The exception message. | ||
|
||
|=== |
Oops, something went wrong.