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
The default setting detects cases where you want to you aim to preserve the state prior to modification within a for loop as below.
for_, v:=rangeslice {
before:=v// Some processing for the variable v.log.Printf("before:%+v, after:%+v", before, v)
}
We have the option "ignore-alias" to avoid to detect assignment to a different variable, but I think the presence of false positives in the default settings is not good.
So I'd like to make the default setting not to detect places assign to a different variable.
In addition, I'll create the option to detect assignment to a different variable for cases like _i := i.
karamaru-alpha
changed the title
Ignore assignment to a different variable by default
Ignore assigning the loop variable to another variable by default
Apr 9, 2024
The default setting detects cases where you want to you aim to preserve the state prior to modification within a for loop as below.
We have the option "ignore-alias" to avoid to detect assignment to a different variable, but I think the presence of false positives in the default settings is not good.
So I'd like to make the default setting not to detect places assign to a different variable.
In addition, I'll create the option to detect assignment to a different variable for cases like
_i := i
.Related: #8
The text was updated successfully, but these errors were encountered: