View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="RegexpMultiline">
4       <property name="format" value="Test #[0-9]+:[A-Za-z ]+"/>
5       <property name="ignoreCase" value="true"/>
6       <property name="maximum" value="3"/>
7     </module>
8   </module>
9   */
10  package com.puppycrawl.tools.checkstyle.checks.regexp.regexpmultiline;
11  
12  // xdoc section -- start
13  class Example4 {
14    void testMethod1() {
15  
16      System.out.print("Example");
17  
18      System.err.println("Example");
19      System
20      .out.print("Example");
21      System
22      .err.println("Example");
23      System.
24      out.print("Example");
25      System.
26      err.println("Example");
27    }
28  
29    void testMethod2() {
30  
31      System.out.println("Test #1: this is a test string");
32  
33      System.out.println("TeSt #2: This is a test string");
34  
35      System.out.println("TEST #3: This is a test string");
36      int i = 5;
37  
38      System.out.println("Value of i: " + i);
39      // violation below, 'Line matches the illegal pattern'
40      System.out.println("Test #4: This is a test string");
41      // violation below, 'Line matches the illegal pattern'
42      System.out.println("TEst #5: This is a test string");
43    }
44  }
45  // xdoc section -- end