Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

TLATER
Copy link

@TLATER TLATER commented Apr 19, 2022

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
Copy link
Author

TLATER commented Apr 19, 2022

Oh, heh, duplicate of #29, damnit.

@TLATER
Copy link
Author

TLATER commented Apr 19, 2022

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

@TLATER TLATER closed this Apr 19, 2022
@TLATER TLATER deleted the tlater/long-urls branch April 19, 2022 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant