@@ -19,12 +19,10 @@ type BaseIssue struct {
19
19
replacement * result.Replacement
20
20
}
21
21
22
- //nolint:gocritic // TODO must be change in the future.
23
22
func (b BaseIssue ) Position () token.Position {
24
23
return b .position
25
24
}
26
25
27
- //nolint:gocritic // TODO must be change in the future.
28
26
func (b BaseIssue ) Replacement () * result.Replacement {
29
27
return b .replacement
30
28
}
@@ -33,75 +31,64 @@ type ExtraLeadingSpace struct {
33
31
BaseIssue
34
32
}
35
33
36
- //nolint:gocritic // TODO must be change in the future.
37
34
func (i ExtraLeadingSpace ) Details () string {
38
35
return fmt .Sprintf ("directive `%s` should not have more than one leading space" , i .fullDirective )
39
36
}
40
37
41
- //nolint:gocritic // TODO must be change in the future.
42
38
func (i ExtraLeadingSpace ) String () string { return toString (i ) }
43
39
44
40
type NotMachine struct {
45
41
BaseIssue
46
42
}
47
43
48
- //nolint:gocritic // TODO must be change in the future.
49
44
func (i NotMachine ) Details () string {
50
45
expected := i .fullDirective [:2 ] + strings .TrimLeftFunc (i .fullDirective [2 :], unicode .IsSpace )
51
46
return fmt .Sprintf ("directive `%s` should be written without leading space as `%s`" ,
52
47
i .fullDirective , expected )
53
48
}
54
49
55
- //nolint:gocritic // TODO must be change in the future.
56
50
func (i NotMachine ) String () string { return toString (i ) }
57
51
58
52
type NotSpecific struct {
59
53
BaseIssue
60
54
}
61
55
62
- //nolint:gocritic // TODO must be change in the future.
63
56
func (i NotSpecific ) Details () string {
64
57
return fmt .Sprintf ("directive `%s` should mention specific linter such as `%s:my-linter`" ,
65
58
i .fullDirective , i .directiveWithOptionalLeadingSpace )
66
59
}
67
60
68
- //nolint:gocritic // TODO must be change in the future.
69
61
func (i NotSpecific ) String () string { return toString (i ) }
70
62
71
63
type ParseError struct {
72
64
BaseIssue
73
65
}
74
66
75
- //nolint:gocritic // TODO must be change in the future.
76
67
func (i ParseError ) Details () string {
77
68
return fmt .Sprintf ("directive `%s` should match `%s[:<comma-separated-linters>] [// <explanation>]`" ,
78
69
i .fullDirective ,
79
70
i .directiveWithOptionalLeadingSpace )
80
71
}
81
72
82
- //nolint:gocritic // TODO must be change in the future.
83
73
func (i ParseError ) String () string { return toString (i ) }
84
74
85
75
type NoExplanation struct {
86
76
BaseIssue
87
77
fullDirectiveWithoutExplanation string
88
78
}
89
79
90
- //nolint:gocritic // TODO must be change in the future.
91
80
func (i NoExplanation ) Details () string {
92
81
return fmt .Sprintf ("directive `%s` should provide explanation such as `%s // this is why`" ,
93
82
i .fullDirective , i .fullDirectiveWithoutExplanation )
94
83
}
95
84
96
- //nolint:gocritic // TODO must be change in the future.
97
85
func (i NoExplanation ) String () string { return toString (i ) }
98
86
99
87
type UnusedCandidate struct {
100
88
BaseIssue
101
89
ExpectedLinter string
102
90
}
103
91
104
- //nolint:gocritic // TODO must be change in the future.
105
92
func (i UnusedCandidate ) Details () string {
106
93
details := fmt .Sprintf ("directive `%s` is unused" , i .fullDirective )
107
94
if i .ExpectedLinter != "" {
@@ -110,7 +97,6 @@ func (i UnusedCandidate) Details() string {
110
97
return details
111
98
}
112
99
113
- //nolint:gocritic // TODO must be change in the future.
114
100
func (i UnusedCandidate ) String () string { return toString (i ) }
115
101
116
102
func toString (i Issue ) string {
0 commit comments