OPA v1.5.0, improved report formatting#1569
Merged
anderseknert merged 1 commit intomainfrom May 30, 2025
Merged
Conversation
- OPA v1.5.0 - 10% faster linting! - tablewriter v1.0.7 - new API and somewhat prettier output - Go version bumped to 1.23.9 - Some other minor version bumps Performance difference `regal lint bundle`: ``` 968805333 ns/op 2970674744 B/op 56876788 allocs/op 906316730 ns/op 2762815940 B/op 50799464 allocs/op ``` The `compact` format now has a style better suited for the terminal: **Previously:** ```shell regal lint -f compact p.rego +------------+-------------------------------------------+ | Location | Description | +------------+-------------------------------------------+ | p.rego:1:9 | Directory structure should mirror package | | p.rego:1:1 | File should be formatted with `opa fmt` | | p.rego:3:5 | Prefer := over = for assignment | +------------+-------------------------------------------+ 1 file linted , 3 violations found. ``` **Now:** ```shell regal lint -f compact p.rego ┌────────────┬───────────────────────────────────────────┐ │ LOCATION │ DESCRIPTION │ ├────────────┼───────────────────────────────────────────┤ │ p.rego:1:9 │ Directory structure should mirror package │ │ p.rego:1:1 │ File should be formatted with `opa fmt` │ │ p.rego:3:5 │ Prefer := over = for assignment │ └────────────┴───────────────────────────────────────────┘ 1 file linted , 3 violations found. ``` The default `pretty` format looks the same, but uses spaces instead of tabs in some places. Tests that rely on the exact formatting of the output may need to be updated. Signed-off-by: Anders Eknert <anders@styra.com>
charlieegan3
approved these changes
May 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Performance difference
regal lint bundle:The
compactformat now has a style better suited for the terminal:Previously:
Now:
The default
prettyformat looks the same, but uses spaces instead of tabs in some places.Tests that rely on the exact formatting of the output may need to be updated.