AtomLinter/linter-coffeelint

Exception for URLs going to end of line with `max_line_length`?

brettz9 opened this issue · 4 comments

I know other linters (such as markdown) forgive max lines which exceed the designated amount as long as it is due to a URL at the end of a line (with nothing after it).

Could support for this be added, as I need a long URL in the comments...

Thanks!

This project is just integration between CoffeeLint and Atom, so this type of request would belong in coffeelint.

This has already been implemented. It looks like the URL needs to be on a line by itself to match the exception. See max_line_length.coffee

Hmm... it's not working for me:

# https://example.com/abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg

Ok, I can report it there, thanks.

Your exact URL works fine for me.

asa@asa:/tmp/foo$ cat tmp.coffee 
# Lint your CoffeeScript! alsdkf jlaksdf jlkdsa fjlksad jflkdsa jflksad jflaskdj flkasdj flaksdj f
# https://example.com/abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg
asa@asa:/tmp/foo$ coffeelint --version
1.15.0
asa@asa:/tmp/foo$ coffeelint tmp.coffee 
  ✗ tmp.coffee
     ✗ #1: Line exceeds maximum allowed length. Length is 98, max is 80.

✗ Lint! » 1 error and 0 warnings in 1 file

On Atom 1.6.2 on Windows, with linter 1.11.4 and linter-coffeelint 1.1.2, this URL in my keymap.cson gets the error (even tested as such with nothing else in the file). I don't have coffeelint in my path.