Skip to content

Commit 10c51c7

Browse files
committed
Restore formatting in pmd ruleset.
1 parent 01c6bce commit 10c51c7

File tree

1 file changed

+33
-36
lines changed

1 file changed

+33
-36
lines changed

.github/pmd-ruleset.xml

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<?xml version="1.0"?>
22
<ruleset name="dogfood7"
3-
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
3+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
66
<description>Rules to check Powertools for Lambda</description>
77
<!--
8-
Originally copied from:
9-
https://github.com/pmd/build-tools/blob/main/src/main/resources/net/sourceforge/pmd/pmd-dogfood-config.xml
8+
Originally copied from: https://github.com/pmd/build-tools/blob/main/src/main/resources/net/sourceforge/pmd/pmd-dogfood-config.xml
109
-->
11-
10+
1211
<!--
1312
Note: Eventually, this ruleset should include all rules and exclude those,
1413
which we know are explicitly decided as not applicable to PMD itself.
@@ -212,10 +211,9 @@
212211
<!--
213212
<rule ref="category/java/design.xml/LoosePackageCoupling">
214213
<properties>
215-
<property
216-
name="packages"><value>net.sourceforge.pmd.lang,net.sourceforge.pmd.lang.java,net.sourceforge.pmd.lang.jsp,net.sourceforge.pmd.lang.ecmascript,net.sourceforge.pmd.lang.cpp</value></property>
214+
<property name="packages"><value>net.sourceforge.pmd.lang,net.sourceforge.pmd.lang.java,net.sourceforge.pmd.lang.jsp,net.sourceforge.pmd.lang.ecmascript,net.sourceforge.pmd.lang.cpp</value></property>
217215
<property name="classes">
218-
<value>net.sourceforge.pmd.lang.Language,net.sourceforge.pmd.lang.LanguageVersion,net.sourceforge.pmd.lang.LanguageVersionDiscoverer,net.sourceforge.pmd.lang.LanguageVersionHandler,net.sourceforge.pmd.lang.Parser,net.sourceforge.pmd.lang.ast.Node</value>
216+
<value>net.sourceforge.pmd.lang.Language,net.sourceforge.pmd.lang.LanguageVersion,net.sourceforge.pmd.lang.LanguageVersionDiscoverer,net.sourceforge.pmd.lang.LanguageVersionHandler,net.sourceforge.pmd.lang.Parser,net.sourceforge.pmd.lang.ast.Node</value>
219217
</property>
220218
</properties>
221219
</rule>
@@ -265,7 +263,7 @@
265263
<rule ref="category/java/errorprone.xml/AssignmentInOperand">
266264
<priority>1</priority>
267265
<properties>
268-
<property name="allowWhile" value="true" />
266+
<property name="allowWhile" value="true"/>
269267
</properties>
270268
</rule>
271269
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic">
@@ -329,8 +327,7 @@
329327
<rule ref="category/java/errorprone.xml/CompareObjectsWithEquals">
330328
<priority>1</priority>
331329
<properties>
332-
<property name="typesThatCompareByReference"
333-
value="java.lang.Enum,java.lang.Class,net.sourceforge.pmd.lang.ast.Node,net.sourceforge.pmd.lang.ast.GenericToken" />
330+
<property name="typesThatCompareByReference" value="java.lang.Enum,java.lang.Class,net.sourceforge.pmd.lang.ast.Node,net.sourceforge.pmd.lang.ast.GenericToken"/>
334331
</properties>
335332
</rule>
336333
<rule ref="category/java/errorprone.xml/ComparisonWithNaN">
@@ -522,10 +519,10 @@
522519

523520
<!-- PMD specific custom rules -->
524521
<rule name="UseInstanceofToCompareClasses"
525-
language="java"
526-
since="5.0"
527-
message="replace o.getClass().equals(MyClass.class) with o instanceof MyClass"
528-
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
522+
language="java"
523+
since="5.0"
524+
message="replace o.getClass().equals(MyClass.class) with o instanceof MyClass"
525+
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
529526
<description>replace o.getClass().equals(MyClass.class) with o instanceof MyClass. Make sure MyClass doesn't have descendants</description>
530527
<priority>1</priority>
531528
<properties>
@@ -542,10 +539,10 @@
542539
</rule>
543540

544541
<rule name="ReversedUseInstanceofToCompareClasses"
545-
language="java"
546-
since="5.0"
547-
message="replace MyClass.class.equals(o.getClass()) with o instanceof MyClass"
548-
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
542+
language="java"
543+
since="5.0"
544+
message="replace MyClass.class.equals(o.getClass()) with o instanceof MyClass"
545+
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
549546
<description>replace MyClass.class.equals(o.getClass()) with o instanceof MyClass. Make sure MyClass doesn't have descendants</description>
550547
<priority>3</priority>
551548
<properties>
@@ -562,10 +559,10 @@
562559
</rule>
563560

564561
<rule name="DontCallSuperVisitWhenUsingRuleChain"
565-
language="java"
566-
message="Don't call super.visit() when using the rulechain"
567-
typeResolution="true"
568-
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
562+
language="java"
563+
message="Don't call super.visit() when using the rulechain"
564+
typeResolution="true"
565+
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
569566
<description>Calling super.visit breaks the rulechain, by starting a full visitor run from the passed node downwards. Add all needed nodes to the rulechain instead.</description>
570567
<priority>1</priority>
571568
<properties>
@@ -589,10 +586,10 @@
589586
</rule>
590587

591588
<rule name="AlwaysCallSuperWhenNotUsingRuleChain"
592-
language="java"
593-
message="Always call super.visit() when not using rulechain"
594-
typeResolution="true"
595-
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
589+
language="java"
590+
message="Always call super.visit() when not using rulechain"
591+
typeResolution="true"
592+
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
596593
<description>Just returning without calling super stops visiting of nested nodes like inner classes.</description>
597594
<priority>3</priority>
598595
<properties>
@@ -612,10 +609,10 @@
612609

613610
<!-- Idea from https://github.com/pmd/pmd/pull/3609#discussion_r748292071 -->
614611
<rule name="ReuseInvocationMatcher"
615-
language="java"
616-
message="Reuse InvocationMatcher"
617-
typeResolution="true"
618-
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
612+
language="java"
613+
message="Reuse InvocationMatcher"
614+
typeResolution="true"
615+
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
619616
<description>Share the invocation matcher and not create a new one every time</description>
620617
<priority>1</priority>
621618
<properties>
@@ -631,10 +628,10 @@
631628
</rule>
632629

633630
<rule name="DoNotUseJavaUtilLogging"
634-
language="java"
635-
since="7.0.0"
636-
message="Use slf4j: LoggerFactory.getLogger(MyClass.class)"
637-
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
631+
language="java"
632+
since="7.0.0"
633+
message="Use slf4j: LoggerFactory.getLogger(MyClass.class)"
634+
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
638635
<description>Use slf4j: LoggerFactory.getLogger(MyClass.class)</description>
639636
<priority>1</priority>
640637
<properties>

0 commit comments

Comments
 (0)