Skip to content

chore: adding tests for multiple structs defined in the same type#44

Merged
ldez merged 2 commits intomainfrom
chore/test-multiple-types
Jun 16, 2025
Merged

chore: adding tests for multiple structs defined in the same type#44
ldez merged 2 commits intomainfrom
chore/test-multiple-types

Conversation

@manuelarte
Copy link
Copy Markdown
Owner

I added a test to cover the case:

type (

	MyStruct struct {}
	
	MyStruct2 struct{}

)

the linter is not checking for constructors or methods for this type.

What do you guys @ldez, @alexandear & @ccoVeille think?

@manuelarte manuelarte added help wanted Extra attention is needed question Further information is requested labels Jun 16, 2025
@manuelarte manuelarte changed the title chore: adding tests for multiple types defined in the same type chore: adding tests for multiple structs defined in the same type Jun 16, 2025
@ldez
Copy link
Copy Markdown
Collaborator

ldez commented Jun 16, 2025

It's a choice; there is no right or wrong approach here.

@manuelarte
Copy link
Copy Markdown
Owner Author

It's a choice; there is no right or wrong approach here.

good point, right now it's not getting processed, do you think it's a good idea that this linter also "handle" this scenario?
if so, by default? or under a setting?

@ldez
Copy link
Copy Markdown
Collaborator

ldez commented Jun 16, 2025

I think grouping type is an explicit way to say you want to group types first, so suggesting to split the group does not follow the expected style.

Grouping types is a too "squared" style for me, but in this context, grouping types is superior to order methods and functions.

@manuelarte
Copy link
Copy Markdown
Owner Author

actually I updated the tests to properly test a scenario, and the linter is handling it.

@manuelarte
Copy link
Copy Markdown
Owner Author

@ldez shall we merge this PR (to keep track of the current behaviour), and leave the linter as it is?

@ldez ldez merged commit 2f92bcc into main Jun 16, 2025
12 checks passed
@manuelarte manuelarte deleted the chore/test-multiple-types branch June 16, 2025 16:36
Copy link
Copy Markdown

@ccoVeille ccoVeille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants