@@ -16,9 +16,7 @@ import (
16
16
// s.T().Parallel()
17
17
// }
18
18
//
19
- // func (s *MySuite) BeforeTest(suiteName, testName string) {
20
- // s.T().Parallel()
21
- // }
19
+ // // And other hooks...
22
20
//
23
21
// func (s *MySuite) TestSomething() {
24
22
// s.T().Parallel()
@@ -65,22 +63,24 @@ func (checker SuiteBrokenParallel) Check(pass *analysis.Pass, insp *inspector.In
65
63
continue
66
64
}
67
65
68
- if isSuiteMethod (pass , fd ) {
69
- nextLine := pass .Fset .Position (ce .Pos ()).Line + 1
70
- d := newDiagnostic (checker .Name (), ce , report , & analysis.SuggestedFix {
71
- Message : fmt .Sprintf ("Remove `%s` call" , analysisutil .NodeString (pass .Fset , ce )),
72
- TextEdits : []analysis.TextEdit {
73
- {
74
- Pos : ce .Pos (),
75
- End : pass .Fset .File (ce .Pos ()).LineStart (nextLine ),
76
- NewText : []byte ("" ),
77
- },
66
+ if ! isSuiteMethod (pass , fd ) {
67
+ continue
68
+ }
69
+
70
+ nextLine := pass .Fset .Position (ce .Pos ()).Line + 1
71
+ d := newDiagnostic (checker .Name (), ce , report , & analysis.SuggestedFix {
72
+ Message : fmt .Sprintf ("Remove `%s` call" , analysisutil .NodeString (pass .Fset , ce )),
73
+ TextEdits : []analysis.TextEdit {
74
+ {
75
+ Pos : ce .Pos (),
76
+ End : pass .Fset .File (ce .Pos ()).LineStart (nextLine ),
77
+ NewText : []byte ("" ),
78
78
},
79
- })
79
+ },
80
+ })
80
81
81
- diagnostics = append (diagnostics , * d )
82
- }
83
- return true
82
+ diagnostics = append (diagnostics , * d )
83
+ return false
84
84
}
85
85
86
86
return true
0 commit comments