-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Describe the bug
Compile errors in filter expressions don't include the column number where the parser approximately or exactly locates the error. Most filter expressions are one-liners (are multiple lines even supported?), so the information that the error is on line 1 is not helpful.
Example (I'm not seeking support to make the filter work!):
jq: error: syntax error, unexpected IDENT, expecting $end (Unix shell quoting issues?) at <top-level>, line 1:
..nodes[ ?( @id == 1 ) ]
To Reproduce
Create a query with an erroneus filter expression.
Expected behavior
The error output should provide information where the parser approximately or exactly locates the error in the line, e.g.
jq: error: syntax error, unexpected IDENT, expecting $end (Unix shell quoting issues?) at <top-level>, line 1, column 12:
..nodes[ ?( @id == 1 ) ]
Environment (please complete the following information):
- OS and Version: Ubuntu 21.04
- jq version: 1.6
Additional context
./.
Reactions are currently unavailable