v0.19.0
This release adds several new options for setting configuration options for rules in groups, allowing users to keep a static configuration across updates, or to ignore certainly classes of rules. v0.19.0 also includes a number of fixes to both linter rules and the language server integration, making for an even better experience when using Regal from VS Code or other LSP clients.
New default
rule configuration option
The rules
section in the Regal configuration file may now include a default
attribute either at the top level, or in any specific category. This allows enabling/disabling entire categories of rules, or to avoid Regal to "break" CI/CD builds on updates if new rules are introduced. While it's arguably good to have new problems surfaced, we recognize that some organizations value stability first, and may opt for more controlled upgrades.
Example, using a default
configuration to ignore all rules except for those explicitly listed:
rules:
default:
level: ignore
bugs:
constant-condition:
level: error
deprecated-builtin:
level: error
duplicate-rule:
level: error
Example, using a default
configuration to enable all rules except for those in the style
category:
rules:
default:
level: error
style:
level: ignore
To learn more about the new default
option, and the precedence rules for the various ways to ignore rules, see the Regal docs.
Fixes
- Fix false positive in prefer-some-in-iteration in function args
- Fix false positive in several rules not counting imports in scope
- Many fixes and improvements related to the LSP integration — see the changelog below for details
Changelog
- 441ff78: Correct md link (#584) (@charlieegan3)
- 3889772: Bump github.com/open-policy-agent/opa from 0.62.0 to 0.62.1 (#586) (@dependabot[bot])
- e378276: Fix:
prefer-some-in-iteration
false positive iteration in fn args (#579) (@anderseknert) - 9da1796: docs: make old rule draft (#588) (@charlieegan3)
- 9e9a30e: config: Support the defaulting of rules in config (#587) (@charlieegan3)
- fff72d9: Fix false positive in rules not counting imports in scope (#592) (@anderseknert)
- bef10f7: Add note about vscode support (#593) (@charlieegan3)
- eef7509: Update with-outside-test-context.md (#595) (@gusega)
- 10605cf: Bump leigholiver/commit-with-deploy-key from 1.0.3 to 1.0.4 (#596) (@dependabot[bot])
- 4fc779a: lsp: Make server messages compliant (#594) (@charlieegan3)
- ed1098e: Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#598) (@dependabot[bot])
- b229e5f: Add Linting Rego with... Rego! blog (#599) (@anderseknert)
- 2179066: Add support for editing Regal in VS Code (#600) (@anderseknert)
- 4f559f2: lsp: Handle case where a rego file is empty (#602) (@charlieegan3)