-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Location missing on literal syntax errors #2322
Comments
thanks |
Here they are formatted for easier copying :)
|
Thanks for the fix! Thanks to the above commit I was able to poke around the source and found that the Adding another
But a less brittle solution might be to simply remove the or expression and surface all reader exceptions? Instead of (in the else branch) throwing them to downstream handlers, which ultimately results in the location info being lost.
|
Feel free to poke around and provide a PR with any improvements. |
version
clj-kondo v2024.03.13
platform
native
editor
NA
problem
The following syntax errors cause clj-kondo to report an null / incorrect error location and interfere with the reporting of all other linting errors in the file. (this makes it trickier than usual to pinpoint the source of the error)
repro
Note the missing line and column locations (this confuses the Emacs flycheck checker)
Also
\o
denotes an octal, not unicode escape.In these cases the line number 1 is reported regardless of where the error occurs, and other lint warnings (eg. unresolved symbol) before or after the parsing errors are not reported.
Note too the incomplete error message in the last line.
config
NA
expected behavior
clj-kondo should report the line/column location of these syntax errors, similar to what it does in other similar situations:
The text was updated successfully, but these errors were encountered: