client9 / misspell

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

misspell is marking all of its known words #72

Closed xh3b4sd closed 8 years ago

xh3b4sd commented 8 years ago

When I currently use misspell the following happens.

$ find . -not -path "./.git/*" -not -path "./.workspace/*" | xargs misspell
.workspace/src/github.com/client9/misspell/Makefile:21:17:found "Euclidian" a misspelling of "Euclidean"
.workspace/src/github.com/client9/misspell/Makefile:21:40:found "dependancy" a misspelling of "dependency"
.workspace/src/github.com/client9/misspell/Makefile:21:51:found "reenforced" a misspelling of "reinforced"
.workspace/src/github.com/client9/misspell/Makefile:21:62:found "accidently" a misspelling of "accidentally"
.workspace/src/github.com/client9/misspell/Makefile:21:73:found "surprize" a misspelling of "surprise"
.workspace/src/github.com/client9/misspell/Makefile:21:82:found "dependance" a misspelling of "dependence"
.workspace/src/github.com/client9/misspell/Makefile:21:93:found "idealogy" a misspelling of "ideology"
.workspace/src/github.com/client9/misspell/Makefile:21:102:found "binominal" a misspelling of "binomial"
.workspace/src/github.com/client9/misspell/Makefile:21:124:found "conquerer" a misspelling of "conqueror"
.workspace/src/github.com/client9/misspell/Makefile:21:134:found "withing" a misspelling of "within"
.workspace/src/github.com/client9/misspell/Makefile:21:142:found "casette" a misspelling of "cassette"
.workspace/src/github.com/client9/misspell/Makefile:24:17:found "Euclidian" a misspelling of "Euclidean"
.workspace/src/github.com/client9/misspell/Makefile:24:40:found "dependancy" a misspelling of "dependency"
.workspace/src/github.com/client9/misspell/Makefile:24:51:found "reenforced" a misspelling of "reinforced"
.workspace/src/github.com/client9/misspell/Makefile:24:62:found "accidently" a misspelling of "accidentally"
.workspace/src/github.com/client9/misspell/Makefile:24:73:found "surprize" a misspelling of "surprise"
.workspace/src/github.com/client9/misspell/Makefile:24:82:found "dependance" a misspelling of "dependence"
.workspace/src/github.com/client9/misspell/Makefile:24:93:found "idealogy" a misspelling of "ideology"
.workspace/src/github.com/client9/misspell/Makefile:24:102:found "binominal" a misspelling of "binomial"
.workspace/src/github.com/client9/misspell/Makefile:24:124:found "conquerer" a misspelling of "conqueror"
.workspace/src/github.com/client9/misspell/Makefile:24:134:found "withing" a misspelling of "within"
.workspace/src/github.com/client9/misspell/Makefile:24:142:found "casette" a misspelling of "cassette"
.workspace/src/github.com/client9/misspell/Makefile:27:27:found "withing" a misspelling of "within"
.workspace/src/github.com/client9/misspell/Makefile:30:30:found "withing" a misspelling of "within"
.workspace/src/github.com/client9/misspell/Makefile:33:15:found "withing" a misspelling of "within"
.workspace/src/github.com/client9/misspell/Makefile:36:15:found "withing" a misspelling of "within"
.workspace/src/github.com/client9/misspell/Makefile:46:42:found "contianer" a misspelling of "container"
.workspace/src/github.com/client9/misspell/replace_test.go:13:4:found "knwo" a misspelling of "know"
.workspace/src/github.com/client9/misspell/replace_test.go:51:14:found "Amercia" a misspelling of "America"
.workspace/src/github.com/client9/misspell/mime.go:103:43:found "extenion" a misspelling of "extension"
.workspace/src/github.com/client9/misspell/url.go:13:12:found "attemps" a misspelling of "attempts"
.workspace/src/github.com/client9/misspell/falsepositives_test.go:108:20:found "grammer" a misspelling of "grammar"
.workspace/src/github.com/client9/misspell/replace_test.go:52:10:found "brocoli" a misspelling of "broccoli"
.workspace/src/github.com/client9/misspell/replace_test.go:53:15:found "zeebra" a misspelling of "zebra"
.workspace/src/github.com/client9/misspell/replace_test.go:55:8:found "fiels" a misspelling of "fields"
.workspace/src/github.com/client9/misspell/replace_test.go:56:4:found "Closeing" a misspelling of "Closing"
.workspace/src/github.com/client9/misspell/replace_test.go:57:4:found "closeing" a misspelling of "closing"
.workspace/src/github.com/client9/misspell/replace_test.go:58:5:found "TOOD" a misspelling of "TODO"
.workspace/src/github.com/client9/misspell/replace_test.go:59:5:found "preceed" a misspelling of "precede"
.workspace/src/github.com/client9/misspell/replace_test.go:60:4:found "preceeding" a misspelling of "preceding"
.workspace/src/github.com/client9/misspell/replace_test.go:61:4:found "functionallity" a misspelling of "functionality"
.workspace/src/github.com/client9/misspell/replace_test.go:74:44:found "runing" a misspelling of "running"
.workspace/src/github.com/client9/misspell/replace_test.go:77:3:found "runing" a misspelling of "running"
.workspace/src/github.com/client9/misspell/README.md:9:22:found "langauge" a misspelling of "language"
.workspace/src/github.com/client9/misspell/README.md:48:25:found "langauge" a misspelling of "language"
.workspace/src/github.com/client9/misspell/README.md:103:8:found "zeebra" a misspelling of "zebra"
.workspace/src/github.com/client9/misspell/README.md:104:17:found "zeebra" a misspelling of "zebra"
.workspace/src/github.com/client9/misspell/README.md:110:8:found "zeebra" a misspelling of "zebra"
...

I have misspell currently integrated into one of my projects and right now it is not usable because of the described behaviour.

client9 commented 8 years ago

Ugh sorry.

This is probably related to related to change for https://github.com/client9/misspell/issues/59

does find . -not -path "./.git/*" -not -path "./.workspace/*"

return . (the current directory?) ?

this might work for you:

find . -type f -not -path "./.workspace/*" | xargs misspell

FYI -- -not -path "./.git/*" is not needed. Misspell ignores them automatically.

xh3b4sd commented 8 years ago

does find . -not -path "./.git/*" -not -path "./.workspace/*"

return . (the current directory?) ?

Yes it does. It is the very first result this find command returns.

Using -type f in my find command does the trick for me. It looks like the . in my find command caused some kind of unwanted recursion. I am fine with closing this one.

client9 commented 8 years ago

good... I will make a -no-recurse option as well as some other options shortly.