PMD: откат на движок 6.55.0 (maven-pmd-plugin 3.21.2), закрытый набор из 26 правил; нарушения починены кодом
PR checks / web (pull_request) Successful in 39s
PR checks / java (pull_request) Successful in 3m4s
Main: tests, deploy, autotests / java (push) Successful in 9s
Main: tests, deploy, autotests / web (push) Successful in 43s
Main: tests, deploy, autotests / images-app (push) Successful in 1m13s
Main: tests, deploy, autotests / images-web (push) Successful in 30s
Main: tests, deploy, autotests / deploy (push) Successful in 1m35s
Main: tests, deploy, autotests / autotests (push) Successful in 45s
Main: tests, deploy, autotests / rollback (push) Has been skipped
PR checks / web (pull_request) Successful in 39s
PR checks / java (pull_request) Successful in 3m4s
Main: tests, deploy, autotests / java (push) Successful in 9s
Main: tests, deploy, autotests / web (push) Successful in 43s
Main: tests, deploy, autotests / images-app (push) Successful in 1m13s
Main: tests, deploy, autotests / images-web (push) Successful in 30s
Main: tests, deploy, autotests / deploy (push) Successful in 1m35s
Main: tests, deploy, autotests / autotests (push) Successful in 45s
Main: tests, deploy, autotests / rollback (push) Has been skipped
This commit was merged in pull request #107.
This commit is contained in:
+22
-80
@@ -2,94 +2,36 @@
|
||||
<ruleset name="WordPDF code style" 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>Код-стиль java-word-pdf: codestyle без opinionated-правил, unused-правила,
|
||||
NPE-safe сравнения, гигиена ошибок/ресурсов/многопоточности. Нарушения чинятся
|
||||
кодом — подавление @SuppressWarnings("PMD…") и // NOPMD запрещены.</description>
|
||||
<description>Код-стиль java-word-pdf: закрытый список правил под движок PMD 6.55.0
|
||||
(maven-pmd-plugin 3.21.2; откат с PMD 7 — правила *MustUseBraces удалены в 7-й
|
||||
мажорной, их deprecation-предупреждения в логе verify ожидаемы). Нарушения чинятся
|
||||
кодом — подавление @SuppressWarnings("PMD…") и // NOPMD запрещены; правила не
|
||||
исключаются и не перенастраиваются.</description>
|
||||
|
||||
<!-- ==================== codestyle ==================== -->
|
||||
<rule ref="category/java/codestyle.xml">
|
||||
<!-- opinionated/шумные, намеренно выключены -->
|
||||
<exclude name="AtLeastOneConstructor"/>
|
||||
<exclude name="CallSuperInConstructor"/>
|
||||
<exclude name="CommentDefaultAccessModifier"/>
|
||||
<exclude name="ConfusingTernary"/>
|
||||
<exclude name="FieldDeclarationsShouldBeAtStartOfClass"/>
|
||||
<exclude name="LocalVariableCouldBeFinal"/>
|
||||
<exclude name="LongVariable"/>
|
||||
<exclude name="MethodArgumentCouldBeFinal"/>
|
||||
<exclude name="OnlyOneReturn"/>
|
||||
<exclude name="PrematureDeclaration"/>
|
||||
<exclude name="ShortMethodName"/>
|
||||
<exclude name="ShortVariable"/>
|
||||
<exclude name="UseExplicitTypes"/>
|
||||
<exclude name="UseUnderscoresInNumericLiterals"/>
|
||||
<!-- переопределены ниже -->
|
||||
<exclude name="MethodNamingConventions"/>
|
||||
<exclude name="TooManyStaticImports"/>
|
||||
<exclude name="ControlStatementBraces"/>
|
||||
<exclude name="UnnecessaryImport"/>
|
||||
</rule>
|
||||
|
||||
<!-- регрессионные тесты репо именуются объект_условие (AGENTS.md) -->
|
||||
<rule ref="category/java/codestyle.xml/MethodNamingConventions">
|
||||
<properties>
|
||||
<property name="junit5TestPattern" value="^[a-z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- MockMvc-тесты: >4 статических импортов — норма -->
|
||||
<rule ref="category/java/codestyle.xml/TooManyStaticImports">
|
||||
<properties>
|
||||
<property name="maximumStaticImports" value="12"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<rule ref="category/java/codestyle.xml/UnnecessaryImport"/>
|
||||
|
||||
<!-- case без скобок — норма для этого стиля; true, если строже -->
|
||||
<rule ref="category/java/codestyle.xml/ControlStatementBraces">
|
||||
<properties>
|
||||
<property name="checkCaseStmt" value="false"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- ==================== bestpractices ==================== -->
|
||||
<rule ref="category/java/bestpractices.xml/UnusedAssignment"/>
|
||||
<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/bestpractices.xml/ForLoopCanBeForeach">
|
||||
<priority>2</priority>
|
||||
</rule>
|
||||
<rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace"/>
|
||||
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>
|
||||
<!-- NPE-safe порядок операндов: литерал/константа слева. Заменило кастомное
|
||||
XPath-правило LiteralFirstInEquals: штатное правило строго шире (константа
|
||||
справа — тоже нарушение, плюс ==/!= по строкам). -->
|
||||
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons"/>
|
||||
|
||||
<!-- ==================== design ==================== -->
|
||||
<rule ref="category/java/bestpractices.xml/ForLoopCanBeForeach"/>
|
||||
<rule ref="category/java/design.xml/ExceptionAsFlowControl"/>
|
||||
|
||||
<!-- ==================== errorprone ==================== -->
|
||||
<!-- null вместо пустой коллекции запрещён (priority 1 по умолчанию — валит verify) -->
|
||||
<rule ref="category/java/errorprone.xml/ReturnEmptyCollectionRatherThanNull"/>
|
||||
<!-- литералы в условиях if — только именованными константами -->
|
||||
<rule ref="category/java/errorprone.xml/AvoidLiteralsInIfCondition"/>
|
||||
<rule ref="category/java/errorprone.xml/EmptyCatchBlock">
|
||||
<priority>2</priority>
|
||||
</rule>
|
||||
<rule ref="category/java/errorprone.xml/EqualsNull"/>
|
||||
<rule ref="category/java/errorprone.xml/CloseResource"/>
|
||||
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/>
|
||||
<rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidLosingExceptionInformation"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidLiteralsInIfCondition"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidCatchingNPE"/>
|
||||
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic"/>
|
||||
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly"/>
|
||||
<rule ref="category/java/errorprone.xml/EmptyCatchBlock"/>
|
||||
<rule ref="category/java/errorprone.xml/CompareObjectsWithEquals"/>
|
||||
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
|
||||
<rule ref="category/java/errorprone.xml/ImplicitSwitchFallThrough"/>
|
||||
|
||||
<!-- ==================== multithreading ==================== -->
|
||||
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
|
||||
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
|
||||
<rule ref="category/java/codestyle.xml/UnnecessaryImport"/>
|
||||
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>
|
||||
<rule ref="category/java/multithreading.xml/UnsynchronizedStaticFormatter"/>
|
||||
<rule ref="category/java/errorprone.xml/ReturnEmptyCollectionRatherThanNull"/>
|
||||
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
|
||||
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons"/>
|
||||
<rule ref="category/java/codestyle.xml/WhileLoopsMustUseBraces"/>
|
||||
<rule ref="category/java/codestyle.xml/IfStmtsMustUseBraces"/>
|
||||
<rule ref="category/java/codestyle.xml/IfElseStmtsMustUseBraces"/>
|
||||
<rule ref="category/java/errorprone.xml/ImplicitSwitchFallThrough"/>
|
||||
<rule ref="category/java/codestyle.xml/ForLoopsMustUseBraces"/>
|
||||
</ruleset>
|
||||
|
||||
Reference in New Issue
Block a user