File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ require (
5757 github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f
5858 github.com/ryancurrah/gomodguard v1.2.0
5959 github.com/ryanrolds/sqlclosecheck v0.3.0
60- github.com/sanposhiho/wastedassign v0.1.3
60+ github.com/sanposhiho/wastedassign v0.2.0
6161 github.com/securego/gosec/v2 v2.6.1
6262 github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
6363 github.com/shirou/gopsutil/v3 v3.21.1
Original file line number Diff line number Diff line change @@ -28,28 +28,28 @@ func noUseParamsNoError(params string) int {
2828
2929func manyif (param int ) int {
3030 println (param )
31- useOutOfIf := 1212121 // ERROR "wasted assignment "
31+ useOutOfIf := 1212121 // ERROR "reassigned, but reassigned without using the value "
3232 ret := 0
3333 if false {
3434 useOutOfIf = 200 // ERROR "reassigned, but never used afterwards"
3535 return 0
3636 } else if param == 100 {
37- useOutOfIf = 100 // ERROR "wasted assignment "
37+ useOutOfIf = 100 // ERROR "reassigned, but reassigned without using the value "
3838 useOutOfIf = 201
3939 useOutOfIf = p (useOutOfIf )
40- useOutOfIf += 200 // ERROR "wasted assignment "
40+ useOutOfIf += 200 // ERROR "reassigned, but reassigned without using the value "
4141 } else {
4242 useOutOfIf = 100
4343 useOutOfIf += 100
4444 useOutOfIf = p (useOutOfIf )
45- useOutOfIf += 200 // ERROR "wasted assignment "
45+ useOutOfIf += 200 // ERROR "reassigned, but reassigned without using the value "
4646 }
4747
4848 if false {
4949 useOutOfIf = 200 // ERROR "reassigned, but never used afterwards"
5050 return 0
5151 } else if param == 200 {
52- useOutOfIf = 100 // ERROR "wasted assignment "
52+ useOutOfIf = 100 // ERROR "reassigned, but reassigned without using the value "
5353 useOutOfIf = 201
5454 useOutOfIf = p (useOutOfIf )
5555 useOutOfIf += 200
You can’t perform that action at this time.
0 commit comments