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

quickfix: report usage of ellipsis usage when appending a short list to a slice #1559

Open
ccoVeille opened this issue Jun 5, 2024 · 1 comment

Comments

@ccoVeille
Copy link

ccoVeille commented Jun 5, 2024

Please consider the following code

slice := []int{1, 2, 3}

// Appending slices
slice := append(slice, []int{4, 5, 6}...)

I would expect to report that this would be simpler

slice := []int{1, 2, 3}

// Appending to a slice
slice := append(slice, 4, 5, 6)

I noticed here today, but I already faced in my own code

xhd2015/xgo#163 (comment)

@ccoVeille ccoVeille added the needs-triage Newly filed issue that needs triage label Jun 5, 2024
@ccoVeille
Copy link
Author

ccoVeille commented Jun 5, 2024

@dominikh dominikh changed the title quickfix: report usage of elipsis usage when appending a short list to a slice quickfix: report usage of ellipsis usage when appending a short list to a slice Jun 16, 2024
@dominikh dominikh added new-check and removed needs-triage Newly filed issue that needs triage labels Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants