gordonklaus / ineffassign

Detect ineffectual assignments in Go code.
MIT License
394 stars 22 forks source link

Don't treat initialization to 'false' as assignment. #36

Closed jvmatl closed 5 years ago

jvmatl commented 5 years ago

Fixes #35

jvmatl commented 5 years ago

After I submitted this, I realized there's a tiny flaw: go does not treat false as a reserved word -- personally, I'm ok with ignoring this, because anybody redefines false deserves as much bad karma as the world can throw at them.

https://play.golang.org/p/1HeKi6j3zVd

Update: Pushed a fix for this.