You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggestion for a fix: Simply ignore loops that contain a continue statement. Avoiding false positives feels more important than having a few false negatives. ChatGPT can prototype the code to identify continue statements in the loop body's AST if needed.
Even with
simple=true
, the linter reports about preallocating slices. Here is one such example:As you can see, there is no way to know how many elements will be added to the slice - could be 0 or more, with no way to tell beforehand.
Loops that use continue, or appends which are conditional, should be omitted from this linter.
The text was updated successfully, but these errors were encountered: