misspell icon indicating copy to clipboard operation
misspell copied to clipboard

Latest misspell broke binary strings

Open karalabe opened this issue 8 years ago • 3 comments

If I have a large binary blob embedded via go-bindata, the probability is fairly large to have a "misspelling" it it. Would be nice to ignore strings as until now. This worked correctly up until today.

E.g. https://github.com/ethereum/go-ethereum/blob/master/cmd/puppeth/module_dashboard.go#L391

Causing:

cmd/puppeth/module_dashboard.go:391:5782: "ect" is a misspelling of "etc"
cmd/puppeth/module_dashboard.go:391:275585: "ect" is a misspelling of "etc"
cmd/puppeth/module_dashboard.go:391:378784: "ect" is a misspelling of "etc"

karalabe avatar Apr 14 '17 08:04 karalabe

Most trivial repro:

var variable = "ect"

karalabe avatar Apr 14 '17 09:04 karalabe

Further inspection, it works correctly if I explicitly specify --source=go, so it would seem that it fails detecting that my file is Go and doesn't switch to the new ReplaceGo (https://github.com/client9/misspell/pull/104) method.

karalabe avatar Apr 14 '17 09:04 karalabe

However explicitly specifying go will make it go belly up on non Go files in my repo, so it seems I'm in a deadlock here.

karalabe avatar Apr 14 '17 09:04 karalabe