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