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

feat: add support for enforce-slice-style rule #900

Merged
merged 5 commits into from
Sep 23, 2023

Conversation

denisvmedia
Copy link
Collaborator

Closes #898.

Copy link
Collaborator

@chavacava chavacava left a comment

Choose a reason for hiding this comment

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

Hi @denisvmedia, thanks for the PR.
Test are not passing because one testdata file has expected issue messages not matching with actual messages.

One think you could do in testdata is to use the same set of slice declarations for all test cases (any, make, and literal) and at each testdata file just modify accordingly the // MATCH /... / annotations

testdata/enforce-slice-style-make.go Outdated Show resolved Hide resolved
testdata/enforce-slice-style-make.go Outdated Show resolved Hide resolved
testdata/enforce-slice-style-make.go Outdated Show resolved Hide resolved
testdata/enforce-slice-style-make.go Outdated Show resolved Hide resolved
testdata/enforce-slice-style-make.go Outdated Show resolved Hide resolved
@denisvmedia
Copy link
Collaborator Author

@chavacava yeah, you a right, thanks. I added this suffix but forgot to fix one of the test cases. Now fixed.

@chavacava chavacava merged commit 5009140 into mgechev:master Sep 23, 2023
4 checks passed
@chavacava
Copy link
Collaborator

Merged. Thank you @denisvmedia.

@denisvmedia denisvmedia deleted the feature/enforce-slice-type branch September 23, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linter rule to enforce empty slice declaration/initialization style
2 participants