[ANN] lein-spell: Spell check your clojure docstrings and library docs

81 views
Skip to first unread message

Gabriel Horner

unread,
Jul 2, 2013, 8:26:13 AM7/2/13
to clo...@googlegroups.com
Introducing lein-spell, https://github.com/cldwalker/lein-spell - a library to quickly and easily spell check your clojure libraries.

Usage
---------
lein-spell prints misspelled words, one per line to STDOUT.
By default your library's docstrings and markdown/txt docs are searched:

$ lein-spell
associtaed
bugfix
communitcated
...

You can also check individual files:

$ lein-spell doc/my-tutorial.org

Until lein-spell's dictionary is good enough, there will be false positives. Add those to your local whitelist in .lein-spell. In the example above, bugfix would be a false positive.

Once you're ready to edit your typos, you can see their locations with:

$ lein spell -n
./README.md:25:associtaed
src/my/lib.clj:44:communitcated

This format is compatible with vim's grep so you can easily navigate your typos

$ vim -c 'set grepprg=lein\ spell\ -n' -c 'botright copen' -c 'silent! grep'


Install
---------
Install aspell:

# For mac osx
$ brew install aspell
# For ubuntu/debian
$ apt-get install aspell


Add to your project's :plugins key:

  [lein-spell "0.1.0"]

For more info, see the readme, https://github.com/cldwalker/lein-spell#readme

Feedback welcome,
Gabriel

Phillip Lord

unread,
Jul 3, 2013, 10:51:28 AM7/3/13
to clo...@googlegroups.com

That's really nice.

It would be good to have an option to *not* pick up parameter names; I
often refer to these in doc strings, and they are not always spelling
mistakes.

Phil
> --

--
Phillip Lord, Phone: +44 (0) 191 222 7827
Lecturer in Bioinformatics, Email: philli...@newcastle.ac.uk
School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower, skype: russet_apples
Newcastle University, twitter: phillord
NE1 7RU

Gabriel Horner

unread,
Jul 3, 2013, 12:20:49 PM7/3/13
to clo...@googlegroups.com
Yep. I hadn't got around to that but it's definitely possible with :arglists

I've added a ticket to track it if anyone gets to it before I do - https://github.com/cldwalker/lein-spell/issues/4



--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/hC98dzsWgS0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages