@@ -19,12 +19,10 @@ type BaseIssue struct {
1919 replacement * result.Replacement
2020}
2121
22- //nolint:gocritic // TODO must be change in the future.
2322func (b BaseIssue ) Position () token.Position {
2423 return b .position
2524}
2625
27- //nolint:gocritic // TODO must be change in the future.
2826func (b BaseIssue ) Replacement () * result.Replacement {
2927 return b .replacement
3028}
@@ -33,75 +31,64 @@ type ExtraLeadingSpace struct {
3331 BaseIssue
3432}
3533
36- //nolint:gocritic // TODO must be change in the future.
3734func (i ExtraLeadingSpace ) Details () string {
3835 return fmt .Sprintf ("directive `%s` should not have more than one leading space" , i .fullDirective )
3936}
4037
41- //nolint:gocritic // TODO must be change in the future.
4238func (i ExtraLeadingSpace ) String () string { return toString (i ) }
4339
4440type NotMachine struct {
4541 BaseIssue
4642}
4743
48- //nolint:gocritic // TODO must be change in the future.
4944func (i NotMachine ) Details () string {
5045 expected := i .fullDirective [:2 ] + strings .TrimLeftFunc (i .fullDirective [2 :], unicode .IsSpace )
5146 return fmt .Sprintf ("directive `%s` should be written without leading space as `%s`" ,
5247 i .fullDirective , expected )
5348}
5449
55- //nolint:gocritic // TODO must be change in the future.
5650func (i NotMachine ) String () string { return toString (i ) }
5751
5852type NotSpecific struct {
5953 BaseIssue
6054}
6155
62- //nolint:gocritic // TODO must be change in the future.
6356func (i NotSpecific ) Details () string {
6457 return fmt .Sprintf ("directive `%s` should mention specific linter such as `%s:my-linter`" ,
6558 i .fullDirective , i .directiveWithOptionalLeadingSpace )
6659}
6760
68- //nolint:gocritic // TODO must be change in the future.
6961func (i NotSpecific ) String () string { return toString (i ) }
7062
7163type ParseError struct {
7264 BaseIssue
7365}
7466
75- //nolint:gocritic // TODO must be change in the future.
7667func (i ParseError ) Details () string {
7768 return fmt .Sprintf ("directive `%s` should match `%s[:<comma-separated-linters>] [// <explanation>]`" ,
7869 i .fullDirective ,
7970 i .directiveWithOptionalLeadingSpace )
8071}
8172
82- //nolint:gocritic // TODO must be change in the future.
8373func (i ParseError ) String () string { return toString (i ) }
8474
8575type NoExplanation struct {
8676 BaseIssue
8777 fullDirectiveWithoutExplanation string
8878}
8979
90- //nolint:gocritic // TODO must be change in the future.
9180func (i NoExplanation ) Details () string {
9281 return fmt .Sprintf ("directive `%s` should provide explanation such as `%s // this is why`" ,
9382 i .fullDirective , i .fullDirectiveWithoutExplanation )
9483}
9584
96- //nolint:gocritic // TODO must be change in the future.
9785func (i NoExplanation ) String () string { return toString (i ) }
9886
9987type UnusedCandidate struct {
10088 BaseIssue
10189 ExpectedLinter string
10290}
10391
104- //nolint:gocritic // TODO must be change in the future.
10592func (i UnusedCandidate ) Details () string {
10693 details := fmt .Sprintf ("directive `%s` is unused" , i .fullDirective )
10794 if i .ExpectedLinter != "" {
@@ -110,7 +97,6 @@ func (i UnusedCandidate) Details() string {
11097 return details
11198}
11299
113- //nolint:gocritic // TODO must be change in the future.
114100func (i UnusedCandidate ) String () string { return toString (i ) }
115101
116102func toString (i Issue ) string {
0 commit comments