Fork me on GitHub
#clj-kondo
<
2019-06-21
>
Marc O'Morain12:06:29

here is a slightly interesting case: I deleted some braces from the end of an edn file:

$ clj-kondo --lint  src/test/.clj-kondo/config.edn
src/test/.clj-kondo/config.edn:0:0: error: can't parse src/test/.clj-kondo/config.edn, Unexpected EOF. [at line 5, column 1]

Marc O'Morain12:06:05

The error is flagged as row/col 0:0, but the error message says 5:1

Marc O'Morain12:06:25

{:linters {


    :invalid-arity {:level :error

Marc O'Morain12:06:06

This is somewhere were I really dislike the Clojure error message - it focuses on the wrong thing.

Marc O'Morain12:06:42

“Unexpected EOF” should be “unclosed { at line 4 column 21"

borkdude12:06:24

yeah, good point. I though I parsed that exception somewhere and turned it into the correct locations, but it might not work everywhere. I’ll make an issue

borkdude12:06:49

https://github.com/borkdude/clj-kondo/issues/286 I’m not sure if “unclosed” will work, because this exception comes from tools.reader

borkdude13:06:45

not sure if you wanted to test it, in that case let me know if the linux binary is sufficient