Skip to content

Commit

Permalink
Issue checkstyle#13345: Enabled SeverityMatch example tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SteLeo1602 authored and romani committed Sep 8, 2024
1 parent a66c329 commit 27b7ee9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

// xdoc section -- start
public class Example1 {
public void method1(int V1){} // ok, ParameterNameCheck's severity is info
public void method1(int V1){} // ok, ParameterName's severity is info

public void Method2(){} // violation, 'must match pattern'
public void Method2(){} // violation, MethodName's severity is defaulted to error
}
// xdoc section -- end
10 changes: 10 additions & 0 deletions src/xdocs/filters/severitymatchfilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@
</module>
</module>
</source>
<p id="Example1-code">
Example code:
</p>
<source>
public class Example1 {
public void method1(int V1){} // ok, ParameterName's severity is info

public void Method2(){} // violation, MethodName's severity is defaulted to error
}
</source>
</subsection>
<subsection name="Example of Usage" id="Example_of_Usage">
<ul>
Expand Down
8 changes: 8 additions & 0 deletions src/xdocs/filters/severitymatchfilter.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
value="resources/com/puppycrawl/tools/checkstyle/filters/severitymatchfilter/Example1.java"/>
<param name="type" value="config"/>
</macro>
<p id="Example1-code">
Example code:
</p>
<macro name="example">
<param name="path"
value="resources/com/puppycrawl/tools/checkstyle/filters/severitymatchfilter/Example1.java"/>
<param name="type" value="code"/>
</macro>
</subsection>
<subsection name="Example of Usage" id="Example_of_Usage">
<ul>
Expand Down

0 comments on commit 27b7ee9

Please sign in to comment.