testifylint
testifylint copied to clipboard
suite-naming: enforce consistent suite naming
Running testifylint on a large codebase at work I noticed that suits are not consistently named. It would be useful if testifylint detected this and enforced usage of either (suite *TestSuite) or (s *TestSuite).
Example of inconsistent naming:
// example1_test.go
type ExampleTestSuite1 struct {
suite.Suite
}
func (suite *ExampleTestSuite1) TestExample() {
}
// example2_test.go
type ExampleTestSuite2 struct {
suite.Suite
}
func (s *ExampleTestSuite2) TestExample() {
}
Hi!
Thank you for feedback. Related to https://github.com/Antonboom/testifylint/blob/master/CONTRIBUTING.md#suite-test-name