Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ tools:
- name: trivy
languages: [C, CPP, CSharp, Dart, Dockerfile, Elixir, Go, JSON, Java, Javascript, PHP, Python, Ruby, Rust, Scala, Swift, Terraform, TypeScript, XML, YAML]
extensions: [.c, .cc, .cpp, .cs, .cxx, .dart, .dockerfile, .env, .ex, .exs, .gemspec, .go, .h, .hpp, .ino, .java, .jbuilder, .js, .jsm, .json, .jsx, .mjs, .opal, .php, .podspec, .pom, .py, .rake, .rb, .rlib, .rs, .scala, .swift, .tf, .ts, .tsx, .vue, .wsdl, .xml, .xsl, .yaml, .yml]
files: [.deps.json, .env, .env.dev, .env.development, .env.prod, .env.production, .env.staging, Berksfile, Capfile, Cargo.lock, Cheffile, Directory.Packages.props, Dockerfile, Fastfile, Gemfile, Gemfile.lock, Guardfile, Package.resolved, Packages.props, Pipfile.lock, Podfile, Podfile.lock, Rakefile, Thorfile, Vagabondfile, Vagrantfile, build.sbt.lock, composer.lock, conan.lock, config.ru, go.mod, gradle.lockfile, mix.lock, package-lock.json, package.json, packages.config, packages.lock.json, pnpm-lock.yaml, poetry.lock, pom.xml, pubspec.lock, requirements.txt, uv.lock, yarn.lock]
files: [.deps.json, .env, .env.dev, .env.development, .env.prod, .env.production, .env.staging, Berksfile, Capfile, Cargo.lock, Cheffile, Directory.Packages.props, Dockerfile, Fastfile, Gemfile, Gemfile.lock, Guardfile, Package.resolved, Packages.props, Pipfile.lock, Podfile, Podfile.lock, Rakefile, Thorfile, Vagabondfile, Vagrantfile, build.sbt.lock, composer.lock, conan.lock, config.ru, go.mod, go.sum, gradle.lockfile, mix.lock, package-lock.json, package.json, packages.config, packages.lock.json, pnpm-lock.yaml, poetry.lock, pom.xml, pubspec.lock, requirements.txt, uv.lock, yarn.lock]
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
patterns:
Lizard_ccn-medium:
Lizard_ccn-minor:
category: Complexity
description: Checks if the cyclomatic complexity of a function or logic block exceeds the medium threshold (default is 8).
description: Reports a Minor issue when a function's cyclomatic complexity (the number of independent decision paths through it) reaches the configured threshold, which defaults to 10. This is the earliest warning tier, flagging functions that are beginning to accumulate branching logic.
explanation: |-
# Medium Cyclomatic Complexity control
# Minor Cyclomatic Complexity control

Check the Cyclomatic Complexity value of a function or logic block. If the threshold is not met, raise a Medium issue. The default threshold is 7.
id: Lizard_ccn-medium
level: Warning
severityLevel: Warning
threshold: 8
timeToFix: 10
title: Enforce Medium Cyclomatic Complexity Threshold
Check the Cyclomatic Complexity value of a function or logic block. If the threshold is exceeded, raise a Minor issue. The default threshold is 10.
id: Lizard_ccn-minor
level: Info
severityLevel: Info
threshold: 10
timeToFix: 5
title: Limit Function Cyclomatic Complexity (Minor)
Lizard_file-nloc-medium:
category: Complexity
description: This rule checks if the number of lines of code (excluding comments) in a file exceeds a medium threshold, typically 500 lines.
description: Reports a Medium issue when a file's number of lines of code (excluding comments) reaches the configured threshold, which defaults to 500. Files this large typically mix several concerns and are noticeably harder to navigate and maintain.
explanation: ""
id: Lizard_file-nloc-medium
level: Warning
severityLevel: Warning
threshold: 500
timeToFix: 10
title: Enforce Medium File Length Limit Based on Number of Lines of Code
title: Limit File Length (Medium)
Lizard_nloc-medium:
category: Complexity
description: Checks if the number of lines of code (excluding comments) in a function exceeds a medium threshold (default 50 lines).
description: Reports a Medium issue when a function's number of lines of code (excluding comments) reaches the configured threshold, which defaults to 50. Functions this long usually handle more than one responsibility and are noticeably harder to follow.
explanation: |-
# Medium NLOC control - Number of Lines of Code (without comments)

Expand All @@ -34,10 +34,10 @@ patterns:
severityLevel: Warning
threshold: 50
timeToFix: 10
title: Enforce Medium Number of Lines of Code (NLOC) Limit
title: Limit Function Length (Medium)
Lizard_parameter-count-medium:
category: Complexity
description: This rule checks the number of parameters passed to a function and raises an issue if it exceeds a medium threshold, which by default is 8 parameters.
description: Reports a Medium issue when a function's parameter count reaches the configured threshold, which defaults to 8. A signature this wide is hard to call correctly and usually signals that the function has taken on too many responsibilities.
explanation: |-
# Medium Parameter count control

Expand All @@ -47,4 +47,4 @@ patterns:
severityLevel: Warning
threshold: 8
timeToFix: 10
title: Enforce Medium Parameter Count Limit
title: Limit Function Parameter Count (Medium)
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Codacy PMD 7 Ruleset"
xmlns="https://pmd.github.io/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://pmd.github.io/ruleset/2.0.0 https://pmd.github.io/schemas/pmd-7.0.0.xsd">
<description>Codacy PMD 7 Ruleset</description>
xmlns="https://pmd.github.io/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://pmd.github.io/ruleset/2.0.0 https://pmd.github.io/schemas/pmd-7.0.0.xsd">
<description>Codacy PMD 7 Ruleset</description>
<rule ref="category/apex/design.xml/AvoidDeeplyNestedIfStmts"/>
<rule ref="category/apex/design.xml/ExcessiveParameterList"/>
<rule ref="category/apex/design.xml/ExcessivePublicCount"/>
<rule ref="category/apex/security.xml/ApexBadCrypto"/>
<rule ref="category/apex/security.xml/ApexCRUDViolation"/>
<rule ref="category/apex/security.xml/ApexDangerousMethods"/>
<rule ref="category/apex/security.xml/ApexInsecureEndpoint"/>
<rule ref="category/apex/security.xml/ApexOpenRedirect"/>
<rule ref="category/apex/security.xml/ApexSharingViolations"/>
<rule ref="category/apex/security.xml/ApexSOQLInjection"/>
<rule ref="category/apex/security.xml/ApexSuggestUsingNamedCred"/>
<rule ref="category/apex/security.xml/ApexXSSFromEscapeFalse"/>
<rule ref="category/apex/security.xml/ApexXSSFromURLParam"/>
<rule ref="category/ecmascript/bestpractices.xml/AvoidWithStatement"/>
<rule ref="category/ecmascript/bestpractices.xml/ConsistentReturn"/>
<rule ref="category/ecmascript/bestpractices.xml/UseBaseWithParseInt"/>
<rule ref="category/ecmascript/codestyle.xml/AssignmentInOperand">
<properties>
<property name="allowFor" value="false"/>
Expand All @@ -14,11 +30,19 @@ xsi:schemaLocation="https://pmd.github.io/ruleset/2.0.0 https://pmd.github.io/sc
<property name="allowWhile" value="false"/>
</properties>
</rule>
<rule ref="category/ecmascript/codestyle.xml/UnnecessaryBlock"/>
<rule ref="category/ecmascript/errorprone.xml/EqualComparison"/>
<rule ref="category/java/bestpractices.xml/AvoidReassigningParameters"/>
<rule ref="category/java/bestpractices.xml/CheckResultSet"/>
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine">
<properties>
<property name="strictMode" value="false"/>
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/>
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
<rule ref="category/java/codestyle.xml/ClassNamingConventions">
<properties>
<property name="abstractClassPattern" value="[A-Z][a-zA-Z0-9]*"/>
Expand All @@ -30,6 +54,8 @@ xsi:schemaLocation="https://pmd.github.io/ruleset/2.0.0 https://pmd.github.io/sc
<property name="utilityClassPattern" value="[A-Z][a-zA-Z0-9]*"/>
</properties>
</rule>
<rule ref="category/java/codestyle.xml/ExtendsObject"/>
<rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass"/>
<rule ref="category/java/codestyle.xml/MethodNamingConventions">
<properties>
<property name="junit3TestPattern" value="test[A-Z0-9][a-zA-Z0-9]*"/>
Expand All @@ -40,26 +66,91 @@ xsi:schemaLocation="https://pmd.github.io/ruleset/2.0.0 https://pmd.github.io/sc
<property name="staticPattern" value="[a-z][a-zA-Z0-9]*"/>
</properties>
</rule>
<rule ref="category/java/codestyle.xml/NoPackage"/>
<rule ref="category/java/codestyle.xml/PackageCase"/>
<rule ref="category/java/codestyle.xml/UnnecessaryConstructor"/>
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/>
<rule ref="category/java/codestyle.xml/UnnecessaryReturn"/>
<rule ref="category/java/design.xml/AvoidThrowingNullPointerException"/>
<rule ref="category/java/design.xml/AvoidThrowingRawExceptionTypes"/>
<rule ref="category/java/design.xml/CollapsibleIfStatements"/>
<rule ref="category/java/design.xml/ExcessiveParameterList"/>
<rule ref="category/java/design.xml/LogicInversion"/>
<rule ref="category/java/design.xml/NPathComplexity"/>
<rule ref="category/java/design.xml/SimplifyBooleanExpressions"/>
<rule ref="category/java/design.xml/SimplifyBooleanReturns"/>
<rule ref="category/java/design.xml/SingularField"/>
<rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody"/>
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic"/>
<rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration"/>
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop"/>
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize"/>
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
<rule ref="category/java/errorprone.xml/AvoidInstanceofChecksInCatchClause"/>
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/>
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/>
<rule ref="category/java/errorprone.xml/CheckSkipResult"/>
<rule ref="category/java/errorprone.xml/CompareObjectsWithEquals">
<properties>
<property name="typesThatCompareByReference" value="java.lang.Enum,java.lang.Class"/>
</properties>
</rule>
<rule ref="category/java/errorprone.xml/DoNotHardCodeSDCard"/>
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
<rule ref="category/java/errorprone.xml/EmptyFinalizer"/>
<rule ref="category/java/errorprone.xml/EqualsNull"/>
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
<rule ref="category/java/errorprone.xml/JUnitSpelling"/>
<rule ref="category/java/errorprone.xml/JUnitStaticSuite"/>
<rule ref="category/java/errorprone.xml/MethodWithSameNameAsEnclosingClass"/>
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
<rule ref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass">
<properties>
<property name="annotations" value="org.springframework.beans.factory.annotation.Autowired,javax.inject.Inject,com.google.inject.Inject,lombok.Builder"/>
</properties>
</rule>
<rule ref="category/java/errorprone.xml/NonStaticInitializer"/>
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/>
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/>
<rule ref="category/java/errorprone.xml/UnnecessaryBooleanAssertion"/>
<rule ref="category/java/errorprone.xml/UnnecessaryCaseChange"/>
<rule ref="category/java/errorprone.xml/UseEqualsToCompareStrings"/>
<rule ref="category/java/multithreading.xml/AvoidThreadGroup"/>
<rule ref="category/java/multithreading.xml/DontCallThreadRun"/>
<rule ref="category/java/performance.xml/StringInstantiation"/>
<rule ref="category/java/performance.xml/StringToString"/>
<rule ref="category/java/performance.xml/UseStringBufferLength"/>
<rule ref="category/jsp/bestpractices.xml/DontNestJsfInJstlIteration"/>
<rule ref="category/jsp/bestpractices.xml/NoClassAttribute"/>
<rule ref="category/jsp/bestpractices.xml/NoHtmlComments"/>
<rule ref="category/jsp/bestpractices.xml/NoJspForward"/>
<rule ref="category/jsp/codestyle.xml/DuplicateJspImports"/>
<rule ref="category/jsp/design.xml/NoInlineScript"/>
<rule ref="category/jsp/design.xml/NoInlineStyleInformation"/>
<rule ref="category/jsp/design.xml/NoLongScripts"/>
<rule ref="category/jsp/design.xml/NoScriptlets"/>
<rule ref="category/jsp/errorprone.xml/JspEncoding"/>
<rule ref="category/jsp/security.xml/IframeMissingSrcAttribute"/>
<rule ref="category/jsp/security.xml/NoUnsanitizedJSPExpression"/>
<rule ref="category/plsql/bestpractices.xml/TomKytesDespair"/>
<rule ref="category/plsql/codestyle.xml/MisplacedPragma"/>
<rule ref="category/plsql/design.xml/ExcessiveParameterList"/>
<rule ref="category/plsql/design.xml/TooManyMethods">
<properties>
<property name="maxmethods" value="1"/>
</properties>
</rule>
<rule ref="category/plsql/errorprone.xml/TO_DATE_TO_CHAR"/>
<rule ref="category/plsql/errorprone.xml/TO_DATEWithoutDateFormat"/>
<rule ref="category/plsql/errorprone.xml/TO_TIMESTAMPWithoutDateFormat"/>
<rule ref="category/pom/errorprone.xml/InvalidDependencyTypes">
<properties>
<property name="validTypes" value="pom,jar,maven-plugin,ejb,war,ear,rar,par"/>
</properties>
</rule>
<rule ref="category/pom/errorprone.xml/ProjectVersionAsDependencyVersion"/>
<rule ref="category/xml/errorprone.xml/MistypedCDATASection"/>
<rule ref="category/xsl/codestyle.xml/UseConcatOnce"/>
<rule ref="category/xsl/performance.xml/AvoidAxisNavigation">
<properties>
<property name="checkSelfDescendantAbreviation" value="false"/>
Expand Down
Loading
Loading