Skip to content

Commit 5d36f8d

Browse files
stoyanK7nrmancuso
authored andcommitted
Issue #13627: Use violation messages macro in regexp templates
1 parent c7380de commit 5d36f8d

10 files changed

+41
-75
lines changed

src/xdocs/checks/regexp/regexp.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,18 @@ public static final int A_SETPOINT = 1;
503503
<ul>
504504
<li>
505505
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22duplicate.regexp%22">
506-
duplicate.regexp</a>
506+
duplicate.regexp
507+
</a>
507508
</li>
508509
<li>
509510
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22illegal.regexp%22">
510-
illegal.regexp</a>
511+
illegal.regexp
512+
</a>
511513
</li>
512514
<li>
513515
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22required.regexp%22">
514-
required.regexp</a>
516+
required.regexp
517+
</a>
515518
</li>
516519
</ul>
517520
<p>

src/xdocs/checks/regexp/regexp.xml.template

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,9 @@
323323
</subsection>
324324

325325
<subsection name="Violation Messages" id="Violation_Messages">
326-
<ul>
327-
<li>
328-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22duplicate.regexp%22">
329-
duplicate.regexp</a>
330-
</li>
331-
<li>
332-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22illegal.regexp%22">
333-
illegal.regexp</a>
334-
</li>
335-
<li>
336-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22required.regexp%22">
337-
required.regexp</a>
338-
</li>
339-
</ul>
326+
<macro name="violation-messages">
327+
<param name="checkName" value="Regexp"/>
328+
</macro>
340329
<p>
341330
All messages can be customized if the default message doesn't suit you.
342331
Please <a href="../../config.html#Custom_messages">see the documentation</a>

src/xdocs/checks/regexp/regexpmultiline.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,19 +266,23 @@ void method() {
266266
<ul>
267267
<li>
268268
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.StackOverflowError%22">
269-
regexp.StackOverflowError</a>
269+
regexp.StackOverflowError
270+
</a>
270271
</li>
271272
<li>
272273
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.empty%22">
273-
regexp.empty</a>
274+
regexp.empty
275+
</a>
274276
</li>
275277
<li>
276278
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.exceeded%22">
277-
regexp.exceeded</a>
279+
regexp.exceeded
280+
</a>
278281
</li>
279282
<li>
280283
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.minimum%22">
281-
regexp.minimum</a>
284+
regexp.minimum
285+
</a>
282286
</li>
283287
</ul>
284288
<p>

src/xdocs/checks/regexp/regexpmultiline.xml.template

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -207,24 +207,9 @@
207207
</subsection>
208208

209209
<subsection name="Violation Messages" id="Violation_Messages">
210-
<ul>
211-
<li>
212-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.StackOverflowError%22">
213-
regexp.StackOverflowError</a>
214-
</li>
215-
<li>
216-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.empty%22">
217-
regexp.empty</a>
218-
</li>
219-
<li>
220-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.exceeded%22">
221-
regexp.exceeded</a>
222-
</li>
223-
<li>
224-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.minimum%22">
225-
regexp.minimum</a>
226-
</li>
227-
</ul>
210+
<macro name="violation-messages">
211+
<param name="checkName" value="RegexpMultiline"/>
212+
</macro>
228213
<p>
229214
All messages can be customized if the default message doesn't suit you.
230215
Please <a href="../../config.html#Custom_messages">see the documentation</a>

src/xdocs/checks/regexp/regexponfilename.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,13 @@ src/main/main_class.java //violation, file names should be in Camel Case
249249
<ul>
250250
<li>
251251
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.filename.match%22">
252-
regexp.filename.match</a>
252+
regexp.filename.match
253+
</a>
253254
</li>
254255
<li>
255256
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.filename.mismatch%22">
256-
regexp.filename.mismatch</a>
257+
regexp.filename.mismatch
258+
</a>
257259
</li>
258260
</ul>
259261
<p>

src/xdocs/checks/regexp/regexponfilename.xml.template

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,9 @@
218218
</subsection>
219219

220220
<subsection name="Violation Messages" id="Violation_Messages">
221-
<ul>
222-
<li>
223-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.filename.match%22">
224-
regexp.filename.match</a>
225-
</li>
226-
<li>
227-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.filename.mismatch%22">
228-
regexp.filename.mismatch</a>
229-
</li>
230-
</ul>
221+
<macro name="violation-messages">
222+
<param name="checkName" value="RegexpOnFilename"/>
223+
</macro>
231224
<p>
232225
All messages can be customized if the default message doesn't suit you.
233226
Please <a href="../../config.html#Custom_messages">see the documentation</a>

src/xdocs/checks/regexp/regexpsingleline.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,13 @@ CREATE DATABASE MyDB;
216216
<ul>
217217
<li>
218218
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.exceeded%22">
219-
regexp.exceeded</a>
219+
regexp.exceeded
220+
</a>
220221
</li>
221222
<li>
222223
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.minimum%22">
223-
regexp.minimum</a>
224+
regexp.minimum
225+
</a>
224226
</li>
225227
</ul>
226228
<p>

src/xdocs/checks/regexp/regexpsingleline.xml.template

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,9 @@
170170
</subsection>
171171

172172
<subsection name="Violation Messages" id="Violation_Messages">
173-
<ul>
174-
<li>
175-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.exceeded%22">
176-
regexp.exceeded</a>
177-
</li>
178-
<li>
179-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.minimum%22">
180-
regexp.minimum</a>
181-
</li>
182-
</ul>
173+
<macro name="violation-messages">
174+
<param name="checkName" value="RegexpSingleline"/>
175+
</macro>
183176
<p>
184177
All messages can be customized if the default message doesn't suit you.
185178
Please <a href="../../config.html#Custom_messages">see the documentation</a>

src/xdocs/checks/regexp/regexpsinglelinejava.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,13 @@ class Foo{
240240
<ul>
241241
<li>
242242
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.exceeded%22">
243-
regexp.exceeded</a>
243+
regexp.exceeded
244+
</a>
244245
</li>
245246
<li>
246247
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.minimum%22">
247-
regexp.minimum</a>
248+
regexp.minimum
249+
</a>
248250
</li>
249251
</ul>
250252
<p>

src/xdocs/checks/regexp/regexpsinglelinejava.xml.template

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,9 @@
186186
</subsection>
187187

188188
<subsection name="Violation Messages" id="Violation_Messages">
189-
<ul>
190-
<li>
191-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.exceeded%22">
192-
regexp.exceeded</a>
193-
</li>
194-
<li>
195-
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fregexp%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22regexp.minimum%22">
196-
regexp.minimum</a>
197-
</li>
198-
</ul>
189+
<macro name="violation-messages">
190+
<param name="checkName" value="RegexpSinglelineJava"/>
191+
</macro>
199192
<p>
200193
All messages can be customized if the default message doesn't suit you.
201194
Please <a href="../../config.html#Custom_messages">see the documentation</a>

0 commit comments

Comments
 (0)