gonewest818 / elisp-lint

Basic linting for Emacs Lisp
66 stars 7 forks source link

Permit long lines if a URL is present on it #34

Closed TLATER closed 2 years ago

TLATER commented 2 years ago

I looked at #21 and noticed that most of us just want exceptions for when URLs cause really long lines. This covers that use case, which looks like it's good enough most of the time for now.

The current heuristic just looks for things like http://, because I think stuff like this is reasonable, but would be rejected if the heuristic was stricter:

(setq long-url "https://github.com/gonewest818/elisp-lint/blob/a5ae046c35a898a88eff05137fe9e5159ae610d8/elisp-lint.el")

Another good heuristic may be ^[[:blank:];]*[[:graph:]]+$, which while it would reject the above, would instead match any really long running single-"word". Generally only URLs, or at least things that cannot be broken up like filenames, match this heuristic. Pycodestyle uses this heuristic too. Happy to switch to that if that is preferred.

TLATER commented 2 years ago

Oh, heh, duplicate of #29, damnit.

TLATER commented 2 years ago

I prefer the implementation in #29, I left a small comment there instead.