You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's introduce a syntax error into test.rego, so it becomes
package test
def ault allow :=true
Running regal with JSON format once again gives inconsistent output
error(s) encountered while linting: errors encountered when reading files to lint: 2 errors occurred:
test.rego:3: rego_parse_error: var cannot be used for rule name
test.rego:3: rego_parse_error: var cannot be used for rule name
The inconsistency is that error format is not JSON.
It makes a difficulty when creating Editor/IDE plugin that tries to parse JSON for the list of error.
Since in this case there's no JSON and error has no predefined format.
The text was updated successfully, but these errors were encountered:
That's an excellent point 👍 I'll take a look at how OPA does this, as ideally we'd provide the same JSON error output as OPA does for errors that originate in OPA (like the parser error above).
Hello
Let's say we have file test.rego with following content,
Running
regal
with JSON formatregal lint --format json test.rego
- the successful output will beLet's introduce a syntax error into
test.rego
, so it becomesRunning
regal
with JSON format once again gives inconsistent outputThe inconsistency is that error format is not JSON.
It makes a difficulty when creating Editor/IDE plugin that tries to parse JSON for the list of error.
Since in this case there's no JSON and error has no predefined format.
The text was updated successfully, but these errors were encountered: