Skip to content

Commit

Permalink
chore: configure PMD (TheAlgorithms#5155)
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 authored May 11, 2024
1 parent bbe4a02 commit cb401fe
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ jobs:
run: mvn checkstyle:check
- name: SpotBugs
run: mvn spotbugs:check
- name: PMD
run: mvn pmd:check
95 changes: 95 additions & 0 deletions pmd-exclude.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
com.thealgorithms.bitmanipulation.SingleBitOperations=UselessParentheses
com.thealgorithms.ciphers.AffineCipher=UselessParentheses
com.thealgorithms.ciphers.ColumnarTranspositionCipher=UnnecessaryFullyQualifiedName
com.thealgorithms.ciphers.DES=UselessParentheses
com.thealgorithms.ciphers.HillCipher=UselessParentheses
com.thealgorithms.ciphers.RSA=UselessParentheses
com.thealgorithms.conversions.AnyBaseToAnyBase=UselessParentheses
com.thealgorithms.conversions.AnytoAny=UselessParentheses
com.thealgorithms.conversions.HexToOct=UselessParentheses
com.thealgorithms.conversions.IntegerToRoman=UnnecessaryFullyQualifiedName
com.thealgorithms.datastructures.crdt.LWWElementSet=UselessParentheses
com.thealgorithms.datastructures.crdt.Pair=UnusedPrivateField
com.thealgorithms.datastructures.graphs.A_Star=UselessParentheses
com.thealgorithms.datastructures.graphs.AdjacencyMatrixGraph=CollapsibleIfStatements,UnnecessaryFullyQualifiedName,UselessParentheses
com.thealgorithms.datastructures.graphs.BipartiteGrapfDFS=CollapsibleIfStatements
com.thealgorithms.datastructures.graphs.Kruskal=UselessParentheses
com.thealgorithms.datastructures.hashmap.hashing.HashMapCuckooHashing=UselessParentheses
com.thealgorithms.datastructures.heaps.FibonacciHeap=UselessParentheses
com.thealgorithms.datastructures.heaps.HeapElement=UselessParentheses
com.thealgorithms.datastructures.heaps.HeapNode=UselessParentheses
com.thealgorithms.datastructures.lists.DoublyLinkedList=UselessParentheses
com.thealgorithms.datastructures.lists.SearchSinglyLinkedListRecursion=UselessParentheses
com.thealgorithms.datastructures.lists.SinglyLinkedList=UnusedLocalVariable
com.thealgorithms.datastructures.queues.PriorityQueue=UselessParentheses
com.thealgorithms.datastructures.stacks.NodeStack=UnnecessaryFullyQualifiedName,UnusedFormalParameter
com.thealgorithms.datastructures.stacks.StackArray=UselessParentheses
com.thealgorithms.datastructures.trees.CheckBinaryTreeIsValidBST=UselessParentheses
com.thealgorithms.datastructures.trees.Point=OverrideBothEqualsAndHashcode
com.thealgorithms.datastructures.trees.SegmentTree=UselessParentheses
com.thealgorithms.devutils.nodes.LargeTreeNode=UselessParentheses
com.thealgorithms.devutils.nodes.SimpleNode=UselessParentheses
com.thealgorithms.devutils.nodes.SimpleTreeNode=UselessParentheses
com.thealgorithms.devutils.nodes.TreeNode=UselessParentheses
com.thealgorithms.divideandconquer.ClosestPair=UnnecessaryFullyQualifiedName,UselessParentheses
com.thealgorithms.divideandconquer.Point=UselessParentheses
com.thealgorithms.dynamicprogramming.KnapsackMemoization=UselessParentheses
com.thealgorithms.dynamicprogramming.MatrixChainMultiplication=UselessParentheses
com.thealgorithms.dynamicprogramming.ShortestSuperSequence=UselessParentheses
com.thealgorithms.dynamicprogramming.UniquePaths=UnnecessarySemicolon
com.thealgorithms.dynamicprogramming.WineProblem=UselessParentheses
com.thealgorithms.maths.BinomialCoefficient=UselessParentheses
com.thealgorithms.maths.Complex=UselessParentheses
com.thealgorithms.maths.DistanceFormulaTest=UnnecessaryFullyQualifiedName
com.thealgorithms.maths.DudeneyNumber=UselessParentheses
com.thealgorithms.maths.FibonacciJavaStreamsTest=BigIntegerInstantiation
com.thealgorithms.maths.Gaussian=UselessParentheses
com.thealgorithms.maths.GcdSolutionWrapper=UselessParentheses
com.thealgorithms.maths.HeronsFormula=UselessParentheses
com.thealgorithms.maths.KaprekarNumbers=UselessParentheses
com.thealgorithms.maths.KeithNumber=UselessParentheses
com.thealgorithms.maths.LeonardoNumber=UselessParentheses
com.thealgorithms.maths.LinearDiophantineEquationsSolver=UselessParentheses
com.thealgorithms.maths.MatrixUtil=BigIntegerInstantiation,UselessParentheses
com.thealgorithms.maths.RomanNumeralUtil=UselessParentheses
com.thealgorithms.maths.SecondMinMax=UselessParentheses
com.thealgorithms.maths.SecondMinMaxTest=UnnecessaryFullyQualifiedName
com.thealgorithms.maths.StandardDeviation=UselessParentheses
com.thealgorithms.maths.SumOfArithmeticSeries=UselessParentheses
com.thealgorithms.maths.TrinomialTriangle=UselessParentheses
com.thealgorithms.maths.VampireNumber=CollapsibleIfStatements
com.thealgorithms.maths.Volume=UselessParentheses
com.thealgorithms.matrixexponentiation.Fibonacci=UnnecessaryFullyQualifiedName
com.thealgorithms.misc.Sparsity=UselessParentheses
com.thealgorithms.misc.ThreeSumProblem=UselessParentheses
com.thealgorithms.misc.WordBoggle=UselessParentheses
com.thealgorithms.others.CRC16=UselessParentheses
com.thealgorithms.others.Damm=UnnecessaryFullyQualifiedName
com.thealgorithms.others.Luhn=UnnecessaryFullyQualifiedName
com.thealgorithms.others.Mandelbrot=UselessParentheses
com.thealgorithms.others.MaximumSumOfDistinctSubarraysWithLengthK=CollapsibleIfStatements
com.thealgorithms.others.MiniMaxAlgorithm=UselessParentheses
com.thealgorithms.others.PageRank=UselessParentheses
com.thealgorithms.others.PerlinNoise=UselessParentheses
com.thealgorithms.others.QueueUsingTwoStacks=UselessParentheses
com.thealgorithms.others.QueueWithStack=UselessParentheses
com.thealgorithms.others.Trieac=UselessParentheses
com.thealgorithms.others.Verhoeff=UnnecessaryFullyQualifiedName
com.thealgorithms.searches.InterpolationSearch=UselessParentheses
com.thealgorithms.searches.KMPSearch=UselessParentheses
com.thealgorithms.searches.LinearSearchThread=EmptyCatchBlock
com.thealgorithms.searches.RabinKarpAlgorithm=UselessParentheses
com.thealgorithms.sorts.BubbleSortRecursion=UselessParentheses
com.thealgorithms.sorts.CircleSort=EmptyControlStatement
com.thealgorithms.sorts.CombSort=UselessParentheses
com.thealgorithms.sorts.DutchNationalFlagSort=UselessParentheses
com.thealgorithms.sorts.LinkListSort=EmptyControlStatement,UnusedLocalVariable
com.thealgorithms.sorts.MergeSortNoExtraSpace=UselessParentheses
com.thealgorithms.sorts.PigeonholeSort=UselessParentheses
com.thealgorithms.sorts.RadixSort=UselessParentheses
com.thealgorithms.sorts.WiggleSort=UselessParentheses
com.thealgorithms.stacks.PostfixToInfix=UselessParentheses
com.thealgorithms.strings.HorspoolSearch=UnnecessaryFullyQualifiedName,UselessParentheses
com.thealgorithms.strings.MyAtoi=UselessParentheses
com.thealgorithms.strings.Palindrome=UselessParentheses
com.thealgorithms.strings.Solution=CollapsibleIfStatements
11 changes: 11 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@
</plugins>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.22.0</version>
<configuration>
<printFailingErrors>true</printFailingErrors>
<includeTests>true</includeTests>
<linkXRef>false</linkXRef>
<excludeFromFailureFile>pmd-exclude.properties</excludeFromFailureFile>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit cb401fe

Please sign in to comment.