-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from xdev-software/develop
Release
- Loading branch information
Showing
24 changed files
with
751 additions
and
288 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="Default" | ||
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> | ||
This ruleset checks the code for discouraged programming constructs. | ||
</description> | ||
|
||
<!-- Only rules that don't overlap with CheckStyle! --> | ||
|
||
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/> | ||
<rule ref="category/java/bestpractices.xml/PreserveStackTrace"/> | ||
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/> | ||
<rule ref="category/java/bestpractices.xml/UseStandardCharsets"/> | ||
|
||
<!-- Native code is platform dependent; Loading external native libs might pose a security threat --> | ||
<rule ref="category/java/codestyle.xml/AvoidUsingNativeCode"/> | ||
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches"/> | ||
<rule ref="category/java/codestyle.xml/NoPackage"/> | ||
<rule ref="category/java/codestyle.xml/PrematureDeclaration"/> | ||
|
||
<rule ref="category/java/design.xml"> | ||
<!-- Sometimes abstract classes have just fields --> | ||
<exclude name="AbstractClassWithoutAnyMethod"/> | ||
|
||
<!-- Using RuntimeExceptions is ok --> | ||
<exclude name="AvoidCatchingGenericException"/> | ||
<exclude name="AvoidThrowingRawExceptionTypes"/> | ||
|
||
<!-- Limit too low --> | ||
<exclude name="AvoidDeeplyNestedIfStmts"/> | ||
|
||
<!-- Limit too low --> | ||
<exclude name="CouplingBetweenObjects"/> | ||
|
||
<!-- Limit too low --> | ||
<exclude name="CyclomaticComplexity"/> | ||
|
||
<!-- Makes entity classes impossible --> | ||
<exclude name="DataClass"/> | ||
|
||
<!-- Used commonly particular in bigger methods with upstream throws --> | ||
<exclude name="ExceptionAsFlowControl"/> | ||
|
||
<!-- Limit too low --> | ||
<exclude name="ExcessiveImports"/> | ||
|
||
<!-- Handled by TooManyFields/TooManyMethods --> | ||
<exclude name="ExcessivePublicCount"/> | ||
|
||
<!-- Prohibits accessing members using multiple depths --> | ||
<exclude name="LawOfDemeter"/> | ||
|
||
<!-- No effect --> | ||
<exclude name="LoosePackageCoupling"/> | ||
|
||
<!-- Prohibits singleton pattern --> | ||
<exclude name="MutableStaticState"/> | ||
|
||
<!-- Some override methods or Junit require this --> | ||
<exclude name="SignatureDeclareThrowsException"/> | ||
|
||
<!-- Reports FP for equals methods --> | ||
<exclude name="SimplifyBooleanReturns"/> | ||
|
||
<!-- Limit too low --> | ||
<exclude name="TooManyFields"/> | ||
|
||
<!-- Limit too low --> | ||
<exclude name="TooManyMethods"/> | ||
|
||
<!-- Limit too low --> | ||
<exclude name="UseObjectForClearerAPI"/> | ||
|
||
<!-- Handled by checkstyle --> | ||
<exclude name="UseUtilityClass"/> | ||
</rule> | ||
|
||
<rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts"> | ||
<properties> | ||
<property name="problemDepth" value="4"/> | ||
</properties> | ||
</rule> | ||
<rule ref="category/java/design.xml/CouplingBetweenObjects"> | ||
<properties> | ||
<property name="threshold" value="100"/> | ||
</properties> | ||
</rule> | ||
<rule ref="category/java/design.xml/CyclomaticComplexity"> | ||
<properties> | ||
<property name="classReportLevel" value="150"/> | ||
<property name="methodReportLevel" value="25"/> | ||
<property name="cycloOptions" value=""/> | ||
</properties> | ||
</rule> | ||
<rule ref="category/java/design.xml/ExcessiveImports"> | ||
<properties> | ||
<property name="minimum" value="200"/> | ||
</properties> | ||
</rule> | ||
<rule ref="category/java/design.xml/TooManyFields"> | ||
<properties> | ||
<property name="maxfields" value="50"/> | ||
</properties> | ||
</rule> | ||
<rule ref="category/java/design.xml/TooManyMethods"> | ||
<properties> | ||
<property name="maxmethods" value="100"/> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/> | ||
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/> | ||
<rule ref="category/java/errorprone.xml/ComparisonWithNaN"/> | ||
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly"/> | ||
<rule ref="category/java/errorprone.xml/DontImportSun"/> | ||
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/> | ||
<rule ref="category/java/errorprone.xml/UnnecessaryCaseChange"/> | ||
|
||
|
||
<rule ref="category/java/multithreading.xml"> | ||
<!-- Just bloats code --> | ||
<exclude name="AvoidSynchronizedAtMethodLevel"/> | ||
|
||
<!-- NOPE --> | ||
<exclude name="DoNotUseThreads"/> | ||
|
||
<!-- Doesn't detect nested thread safe singleton pattern --> | ||
<exclude name="NonThreadSafeSingleton"/> | ||
|
||
<!-- Should relevant for fields that use multithreading which is rare --> | ||
<exclude name="UseConcurrentHashMap"/> | ||
</rule> | ||
|
||
<rule ref="category/java/performance.xml"> | ||
<!-- This was fixed in Java 10 --> | ||
<exclude name="AvoidFileStream"/> | ||
|
||
<!-- Used everywhere and has neglectable performance impact --> | ||
<exclude name="AvoidInstantiatingObjectsInLoops"/> | ||
|
||
<!-- Handled by checkstyle --> | ||
<exclude name="RedundantFieldInitializer"/> | ||
|
||
<!-- Nowadays optimized by compiler; No code bloating needed --> | ||
<exclude name="UseStringBufferForStringAppends"/> | ||
</rule> | ||
|
||
<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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: Leaflet | ||
open_collective: leafletjs |
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.