client9 / misspell

Correct commonly misspelled English words in source files
MIT License
1.35k stars 114 forks source link

False negative: package imports #141

Closed vyskocilm closed 6 years ago

vyskocilm commented 6 years ago

Hi,

I got few errors about my import paths -

misspell50%

Misspell Finds commonly misspelled English words

        qrget/main.go
        Line 22: warning: "nucular" is a misspelling of "nuclear" (misspell)
        Line 22: warning: "nucular" is a misspelling of "nuclear" (misspell)
        Line 23: warning: "nucular" is a misspelling of "nuclear" (misspell)

I'd say that it should ignore "mispells" in import section, because those are not words, but identifiers.

cznic commented 6 years ago

I don't think misspell knows or should know what format its input files are.

vyskocilm commented 6 years ago

Oh I assumed because it is written in go, it understand go source files :-)

So isn't there a way how to supress the false negative? nucular happens to be name of real go package, so I can't avoid using it.

cznic commented 6 years ago

So isn't there a way how to supress the false negative?

See the -i flag.

vyskocilm commented 6 years ago

ok, thanks