testifylint icon indicating copy to clipboard operation
testifylint copied to clipboard

suite-naming: enforce consistent suite naming

Open Limero opened this issue 1 year ago • 1 comments

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() {
}

Limero avatar Jan 05 '24 03:01 Limero

Hi!

Thank you for feedback. Related to https://github.com/Antonboom/testifylint/blob/master/CONTRIBUTING.md#suite-test-name

Antonboom avatar Jan 05 '24 06:01 Antonboom