Skip to content

Commit

Permalink
Issue #13627: Use violation messages macro in sizes templates
Browse files Browse the repository at this point in the history
  • Loading branch information
stoyanK7 authored and nrmancuso committed Aug 26, 2023
1 parent 5d36f8d commit 07404d1
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 90 deletions.
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/anoninnerlength.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLen.anonInner%22">
maxLen.anonInner</a>
maxLen.anonInner
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/anoninnerlength.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,9 @@
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLen.anonInner%22">
maxLen.anonInner</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="AnonInnerLength"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/executablestatementcount.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22executableStatementCount%22">
executableStatementCount</a>
executableStatementCount
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/executablestatementcount.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,9 @@
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22executableStatementCount%22">
executableStatementCount</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="ExecutableStatementCount"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/filelength.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLen.file%22">
maxLen.file</a>
maxLen.file
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/filelength.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,9 @@
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLen.file%22">
maxLen.file</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="FileLength"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/lambdabodylength.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ class Example2 {
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLen.lambdaBody%22">
maxLen.lambdaBody</a>
maxLen.lambdaBody
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/lambdabodylength.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,9 @@
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLen.lambdaBody%22">
maxLen.lambdaBody</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="LambdaBodyLength"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/linelength.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ import java.util.regex.Pattern; // The length of this comment will be taken into
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLineLen%22">
maxLineLen</a>
maxLineLen
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/linelength.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,9 @@ import java.util.regex.Pattern; // The length of this comment will be taken into
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLineLen%22">
maxLineLen</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="LineLength"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
15 changes: 10 additions & 5 deletions src/xdocs/checks/sizes/methodcount.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,23 +196,28 @@ public class ExampleClass {
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.methods%22">
too.many.methods</a>
too.many.methods
</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.packageMethods%22">
too.many.packageMethods</a>
too.many.packageMethods
</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.privateMethods%22">
too.many.privateMethods</a>
too.many.privateMethods
</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.protectedMethods%22">
too.many.protectedMethods</a>
too.many.protectedMethods
</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.publicMethods%22">
too.many.publicMethods</a>
too.many.publicMethods
</a>
</li>
</ul>
<p>
Expand Down
25 changes: 3 additions & 22 deletions src/xdocs/checks/sizes/methodcount.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -182,28 +182,9 @@ public class ExampleClass {
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.methods%22">
too.many.methods</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.packageMethods%22">
too.many.packageMethods</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.privateMethods%22">
too.many.privateMethods</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.protectedMethods%22">
too.many.protectedMethods</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.publicMethods%22">
too.many.publicMethods</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="MethodCount"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/methodlength.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ public class MyTest {
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLen.method%22">
maxLen.method</a>
maxLen.method
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/methodlength.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,9 @@
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxLen.method%22">
maxLen.method</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="MethodLength"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/outertypenumber.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxOuterTypes%22">
maxOuterTypes</a>
maxOuterTypes
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/outertypenumber.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,9 @@
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxOuterTypes%22">
maxOuterTypes</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="OuterTypeNumber"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/parameternumber.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ public void needsLotsOfParameters(int a,
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxParam%22">
maxParam</a>
maxParam
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/parameternumber.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,9 @@
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22maxParam%22">
maxParam</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="ParameterNumber"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down
3 changes: 2 additions & 1 deletion src/xdocs/checks/sizes/recordcomponentnumber.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ private record MyRecord2(int x, int y, String str, Node node) { // violation
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.components%22">
too.many.components</a>
too.many.components
</a>
</li>
</ul>
<p>
Expand Down
9 changes: 3 additions & 6 deletions src/xdocs/checks/sizes/recordcomponentnumber.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,9 @@
</subsection>

<subsection name="Violation Messages" id="Violation_Messages">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fsizes%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22too.many.components%22">
too.many.components</a>
</li>
</ul>
<macro name="violation-messages">
<param name="checkName" value="RecordComponentNumber"/>
</macro>
<p>
All messages can be customized if the default message doesn't suit you.
Please <a href="../../config.html#Custom_messages">see the documentation</a>
Expand Down

0 comments on commit 07404d1

Please sign in to comment.