aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputDifficultAnnotations.java
blob: 41f1fe89095b659942d9a7adab6b2fefe1ca6ef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package com.puppycrawl.tools.checkstyle.checks.indentation; //indent:0 exp:0

/**                                                                           //indent:0 exp:0
 * This test-input is intended to be checked using following configuration:   //indent:1 exp:1
 *                                                                            //indent:1 exp:1
 * arrayInitIndent = 4                                                        //indent:1 exp:1
 * basicOffset = 4                                                            //indent:1 exp:1
 * braceAdjustment = 0                                                        //indent:1 exp:1
 * caseIndent = 4                                                             //indent:1 exp:1
 * forceStrictCondition = false                                               //indent:1 exp:1
 * lineWrappingIndentation = 4                                                //indent:1 exp:1
 * tabWidth = 4                                                               //indent:1 exp:1
 * throwsIndent = 4                                                           //indent:1 exp:1
 *                                                                            //indent:1 exp:1
 *                                                                            //indent:1 exp:1
 */                                                                           //indent:1 exp:1
@DifficultAnnotation({ //indent:0 exp:0
    @MyType(value = Boolean.class, //indent:4 exp:4
        name = "boolean"), //indent:8 exp:>=8
    @MyType(value = String.class, name = "string") }) //indent:4 exp:4
@SimpleAnnotation //indent:0 exp:0
public class InputDifficultAnnotations { //indent:0 exp:0

    @DifficultAnnotation({ //indent:4 exp:4
        @MyType(value = Boolean.class, name = "boolean"), //indent:8 exp:8
        @MyType(value = String.class, name = "string") }) //indent:8 exp:8
    @SimpleAnnotation //indent:4 exp:4
    String foo = "foo"; //indent:4 exp:4

    @DifficultAnnotation({ //indent:4 exp:4
        @MyType(value = Boolean.class, name = "boolean"), //indent:8 exp:8
        @MyType(value = String.class, name = "string") }) //indent:8 exp:8
    @SimpleAnnotation //indent:4 exp:4
    void foo() { //indent:4 exp:4

    } //indent:4 exp:4
} //indent:0 exp:0

@DifficultAnnotation({ //indent:0 exp:0
@MyType(value = Boolean.class, name = "boolean"), //indent:0 exp:4 warn
@MyType(value = String.class, name = "string") }) //indent:0 exp:4 warn
class IncorrectClass { //indent:0 exp:0

    @DifficultAnnotation({ //indent:4 exp:4
        @MyType(value = Boolean.class, name = "boolean"), //indent:8 exp:8
        @MyType(value = String.class, name = "string") }) //indent:8 exp:8
    String foo = "foo"; //indent:4 exp:4

    @DifficultAnnotation({ //indent:4 exp:4
      @MyType(value = Boolean.class, name = "boolean"), //indent:6 exp:8 warn
        @MyType(value = String.class, name = "string") }) //indent:8 exp:8
    void foo() { //indent:4 exp:4

    } //indent:4 exp:4
} //indent:0 exp:0

@interface DifficultAnnotation { //indent:0 exp:0

    MyType[] value(); //indent:4 exp:4

} //indent:0 exp:0

@interface MyType { //indent:0 exp:0

    Class<?> value(); //indent:4 exp:4

    String name(); //indent:4 exp:4
} //indent:0 exp:0

@interface SimpleAnnotation {} //indent:0 exp:0