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

enforce-slice-style: Support nil declaration enforcement #974

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

jalaziz
Copy link
Contributor

@jalaziz jalaziz commented Feb 25, 2024

Add support for enforcing nil slice declarations as recommended by both the Go Code Review and Uber style guides.

This initial version is quite strict in that it also prevents using empty literal and make-style slices in struct assignments and as function arguments.

Closes #971

Add support for enforcing nil slice declarations as recommended by both
the Go Code Review and Uber style guides.

This initial version is quite strict in that it also prevents using
empty literal and make-style slices in struct assignments and as
function arguments.
@denisvmedia
Copy link
Collaborator

Thank you for your PR @jalaziz , do you mind also updating the docs?

@jalaziz
Copy link
Contributor Author

jalaziz commented Feb 25, 2024

Thank you for your PR @jalaziz , do you mind also updating the docs?

Done, let me know if you'd like me to add more detail 🙏🏼

@chavacava
Copy link
Collaborator

LGTM

@denisvmedia denisvmedia merged commit 17a0393 into mgechev:master Feb 26, 2024
4 checks passed
@jalaziz jalaziz deleted the 971 branch March 19, 2024 12:25
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.

enforce-slice-style: Add declaration style
3 participants