Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suite-naming: enforce consistent suite naming #48

Open
Limero opened this issue Jan 5, 2024 · 2 comments
Open

suite-naming: enforce consistent suite naming #48

Limero opened this issue Jan 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Limero
Copy link

Limero commented Jan 5, 2024

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() {
}
@Antonboom
Copy link
Owner

@Antonboom Antonboom added the enhancement New feature or request label Jan 9, 2024
@Antonboom
Copy link
Owner

Also related
stretchr/testify#1512

@Antonboom Antonboom changed the title feature: Enforce consistent suite naming suite-naming: enforce consistent suite naming Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants