Path to this page:
./
devel/regal,
Linter for Rego
Branch: CURRENT,
Version: 0.29.2,
Package name: regal-0.29.2,
Maintainer: leotRegal is a linter for Rego, with the goal of making your Rego
magnificent!
Regal goals are:
- Identify common mistakes, bugs and inefficiencies in Rego policies,
and suggest better approaches
- Provide advice on best practices, coding style, and tooling
- Allow users, teams and organizations to enforce custom rules on their
policy code
Regal rules are to as large extent as possible written in Rego
themselves, using the JSON representation of the Rego abstract syntax
tree (AST) as input, a few additional custom built-in functions and
some indexed data structures to help with linting.
Master sites:
Filesize: 3447.213 KB
Version history: (Expand)
- (2024-11-22) Updated to version: regal-0.29.2
- (2024-10-20) Updated to version: regal-0.28.0
- (2024-09-06) Updated to version: regal-0.25.0nb1
- (2024-08-19) Updated to version: regal-0.25.0
- (2024-08-11) Updated to version: regal-0.24.0nb1
- (2024-07-17) Updated to version: regal-0.24.0
CVS history: (Expand)
2024-11-22 18:53:41 by Leonardo Taccari | Files touched by this commit (3) |
Log message:
regal: Update to 0.29.2
Changes:
v0.29.2
This patch release fixes an issue where the new defer-assignment rule
would sometimes report a false positive when the variable was used
inside of a `with` clause on the next line.
v0.29.1
This patch release fixes an issue where custom (i.e. user-created)
aggregate rules wouldn't work as expected when the condition for a
violation was the absence of aggregated data. This could for example be
a rule that says "at least one rule must be named allow, and it must
have a default assignment to `false`".
v0.29.0
This is a big release, spanning more than a month of development!
Regal v0.29.0 brings new linter rules, performance improvements and new
features to both the linter and the language server.
New rules:
- defer-assignment
- walk-no-path
- rule-assigns-default
Misc improvements and bug fixes.
|
2024-09-06 20:49:02 by Benny Siegert | Files touched by this commit (180) | |
Log message:
Revbump all Go packages after go122 update
|
2024-08-19 17:16:08 by Leonardo Taccari | Files touched by this commit (3) | |
Log message:
regal: Update to 0.25.0
Changes:
0.25.0
------
This release brings 2 new rules to the Regal linter as well as a number
of improvements to the Regal Language Server.
Rules
-----
- New rule unused-output-variable
- New rule use-strings-count
- Other Rule Updates
Linter
------
- JUnit XML output format is now a supported by regal lint
- Regal's version of OPA has been updated to v0.67.0
- The --var-values flag from opa test (added to OPA in v0.66.0) is now
supported by the regal test command. This allows custom policy authors
to see the the variable values in scope of a failed test.
Regal Language Server
---------------------
- Code Lens Support
- Improved formatter
|
2024-08-11 17:57:15 by Benny Siegert | Files touched by this commit (176) | |
Log message:
Revbump all Go packages after update
|
2024-07-17 14:37:07 by Leonardo Taccari | Files touched by this commit (3) | |
Log message:
regal: Update to 0.24.0
Changes:
v0.24.0
This release brings 4 new rules to Regal's linter as well as a number
of improvements to the language server.
## Rules
- New Rule `if-object-literal`
- New Rule `pointless-reassignment`
- New Rule `argument-always-wildcard`
- New Rule `annotation-without-metadata`
- New Rule `var-shadows-builtin`
## Regal Language Server
### Snippet Completions
We have extended the support for completions to add snippets for `some`
and `every`. Both key:value and collection formats are supported.
### Example Links on Keyword and Built-in Hover
We've been building out a new documentation section called Rego By
Example <https://docs.styra.com/opa/rego-by-example>. We have detailed
guides here for some of the common keywords and built-in functions.
Users can now browse directly to these from their editors by hovering
over supported keywords and functions.
v0.23.1
This is a patch release containing a number of fixes. Most of the
issues fixed in this release were not directly related to v0.23.0, but
we simply don't like the idea of waiting for the next release to
address known bugs.
v0.23.0
This release adds 3 new linter rules to Regal, greatly improved
completion suggestions in the language server, and a number of other
improvements and fixes.
- New rule: `leaked-internal-reference`
- New rule: `internal-entrypoint`
- New rule: `ambiguous-scope`
## Language server: Greatly improved completion suggestions
Last release introduced a minimal implementation of code completion,
which means that the language server supports providing completion
suggestions while editing Rego in an editor that supports the Regal
languge server such as VS Code using the OPA VS Code extension.
This release provides greatly improved completion suggestions, including:
- References to packages, rules and functions (both imported and
complete references)
- Keywords like `import`, `default`, `contains`, `if`
- Completions on `input` attributes based on those previously used
- Common rule names like `allow` and `deny`
- New package names based on directory structure
- Many more suggestions based on the context of the cursor position
Using completion suggestions now feels like a total game changer for
productivity, and we really recommend trying it out!
v0.22.0
This is a release brings 3 new linter rules, as well as some exciting
new features, improvements and fixes to both the linter and the
language server.
- New rule: `impossible-not`
- New rule: `messy-rule`
- New rule: `trailing-default-rule`
## Language server: Code completion suggestions
The Regal language server now provides a minimal implementation of the
code completion feature. This first implementation will help suggest
package name based on directory structure, the `rego.v1` import and
built-in functions at certain locations. This provides a big
productivity boost, as users no longer need to jump back to the OPA
docs to find the built-in function they need.
v0.21.3
No one wants to wait for bugs to get fixed! So we don't. This third
patch release following v0.21.0 fixes an issue where deleted or renamed
files would still have violations reported by the language server.
v0.21.2
This is patch release addressing two bugs reported by users.
v0.21.1
This patch releases fixes an issue in the language server, which would
previously send back an error to the client (i.e. your editor) when a
new and empty file was created in the workspace. This would have the
server fail to read any document symbols as a result. This has now been
fixed to only log the error on the server without sending it back to
the client.
v0.21.0
This is a big release, bringing new `regal fix` command, several
features to the Regal language server, a new linter rule, and many
improvements and fixes.
- New command: `regal fix`
The `regal fix` command allows you to automatically fix some of the
(style) issues reported by the Regal linter. This command is available
in the CLI and can be run on a single file or a directory.
The `regal fix` command respects the `.regal/config.yaml` file, and will only \
fix issues that aren't ignored by configuration.
- New rule: `unresolved-import`
- Several Language Server features:
- Code Actions
- Go to Definition
- Formatting
- Document Symbols
- Workspace Symbols
- Folding Ranges
v0.20.1
This release fixes a panic encountered in the language server when
Regal traverses a directory it cannot read while walking the
workspace.
v0.20.0
This release adds various improvements to the functionality of the
language server as well as also including a number of housekeeping
updates and fixes.
|
2024-07-03 08:59:36 by Benny Siegert | Files touched by this commit (169) | |
Log message:
Revbump all Go packages after go122 security update
|
2024-06-13 15:47:13 by Benny Siegert | Files touched by this commit (169) | |
Log message:
Revbump all Go packages after go122 update
|
2024-06-01 16:03:06 by Benny Siegert | Files touched by this commit (168) |
Log message:
Revbump all Go packages, default Go version is now 1.22.
|