Skip to content

Conversation

alingse
Copy link

@alingse alingse commented Jul 3, 2024

TLDR: FIx a bug

I am writing a linter called sundrylint to address some real-world bugs that I discovered during my work.

When we range over a slice and call the append function within the loop body, we are not appending all elements, but only the ones that we specifically iterate over during the range operation.

for _, n := range ns {
   rs = append(rs, n)       # this is mostly wanted
   rs = append(rs, ns...)   # this is wrong
}

I read the code in here and I think it was just want to append the not IsCollinear ip

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.

1 participant