alphapapa / makem.sh

Makefile-like script for linting and testing Emacs Lisp packages
GNU General Public License v3.0
163 stars 13 forks source link

Ignoring URLs in ispell #50

Open FrostyX opened 1 week ago

FrostyX commented 1 week ago

I started using makem.sh for my Emacs package https://github.com/FrostyX/dired-open-with/pull/9 and makem.sh lint complained about some unexpected spelling errors. The most egregious was:

Error checking word AR using ispell with default dictionary

It turns out ispell had a problem with this URL in my docstring: (Please never mind it returns 404. Freedesktop changed the URL ... again, sigh)

https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html

I couldn't add "ar01s07" to my custom words because it contains numbers, so I had to add LocalWords: ar which isn't ideal. Now I won't be notified about typos of "ar" instead of "are".

In any case, it all feels like a workaround to me. The correct solution would be configuring makem.sh lint to ignore spellchecking for URLs. Would that be possible, please?

alphapapa commented 1 week ago

In any case, it all feels like a workaround to me. The correct solution would be configuring makem.sh lint to ignore spellchecking for URLs. Would that be possible, please?

I've no idea. Spell checking is handled by ispell. It seems like ispell should be responsible for not spell-checking tokens that look like URLs; I thought it already did ignore tokens containing punctuation like that.

I'd suggest that you might consider removing the URL from the docstring. It might be as or more suitably placed in a comment than a docstring. (Docstrings in Emacs don't need to be comprehensive; they're just intended to be simple guides. Deeper info is intended for info manuals or source code comments.)

Other than that, I'll have to let you or someone else investigate the deeper intricacies of Ispell; it was enough trouble adding the LocalWords workaround, and I won't have time to investigate this anytime soon.