Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump github.com/styrainc/regal from 0.25.0 to 0.26.1 #1130

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 9, 2024

Bumps github.com/styrainc/regal from 0.25.0 to 0.26.1.

Release notes

Sourced from github.com/styrainc/regal's releases.

v0.26.1

This releases contains a bug fix for an issue introduced in v0.26.0. The bug was caused by a change the required data to complete a formatting Rego 'fix'.

Changelog

  • 1cfdee996945546381648232e73e29b4394baf54: Fix LSP formatting that broke in v0.26.0 (#1055) (@​anderseknert)

v0.26.0

0.26.0

v0.26.0 brings 2 new linter rules to Regal, a debugger API backend, and noticeably faster linting.

Regal v0.26.0 is likely the first consumer of the new debugger API that landed in OPA v0.68.0 just last week — and in turn uses this to expose a first ever Debug Adapter Protocol (DAP) backend for Rego! Next release of the OPA VS Code extension will leverage Regal to provide developers a first-class debugging experience for Rego. Stay tuned!

Thanks to @​johanfylling for tirelessly working to make this happen — in both OPA, Regal, and the OPA VS Code extension.

Rules

New rule: directory-package-mismatch

Category: idiomatic

The directory-package-mismatch rule is a first of its kind in Regal, as it reports issues in project structure rather than in code. This rule codifies an old best practice in Rego projects: the package name (path) should be mirrored in the directory structure a policy resides in. Put simply, a policy declaring package rbac.user.roles should be placed in a rbac/user/roles directory.

The directory-package-mismatch rule not only helps enforce this convention, but provides both CLI (regal fix) and editor support for fixing these issues automatically.

Note: When used on an existing project, this rule will likely result in a lot of violations being reported. While regal fix can remediate that in a matter of seconds (by moving policy files according to their package paths), make sure to commit or stash any existing changes before running it, and then review the result. Read the docs for details!

For more information, see the docs on directory-package-mismatch.

New Rule: sprintf-arguments-mismatch

Category: bugs

The new sprintf-arguments-mismatch rule checks that the formatting directives (%s, %d, etc) in a sprintf call match the supplied number arguments.

Wrong

msg := sprintf("number of issues (%d) must not be higher than %d", [count(issues)])

Correct

msg := sprintf("number of issues (%d) must not be higher than %d", [count(issues), 10])

For more information, see the docs on sprintf-arguments-mismatch.

Debug Adapter Protocol Backend

... (truncated)

Commits
  • 1cfdee9 Fix LSP formatting that broke in v0.26.0 (#1055)
  • bf6e879 lsp: Template new empty files & template on format (#1051)
  • ced7c70 fix: Require use of --force to fix without git (#1052)
  • 7a4811b Fix directory-package-mismatch issue when lint called with "." (#1053)
  • 66a3a76 lsp: Clear old directories when renaming (#1050)
  • fef46d7 fix: Update root detection (#1049)
  • 02d9538 Docs: Document fixing issues, project roots, and new features (#1043)
  • fe9e0d9 build: check yaml and json formatting with dprint (#1047)
  • ccb66fc Codecov experiment (#1045)
  • 7da45a4 build(deps): bump peter-evans/create-pull-request from 6.1.0 to 7.0.0 (#1041)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/styrainc/regal](https://github.com/styrainc/regal) from 0.25.0 to 0.26.1.
- [Release notes](https://github.com/styrainc/regal/releases)
- [Changelog](https://github.com/StyraInc/regal/blob/main/.goreleaser.yaml)
- [Commits](StyraInc/regal@v0.25.0...v0.26.1)

---
updated-dependencies:
- dependency-name: github.com/styrainc/regal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Sep 9, 2024
@zregvart
Copy link
Member

Same issue as in #1131 (comment), perhaps we work on one of these, #1131 might be a good candidate.

@simonbaird
Copy link
Member

simonbaird commented Sep 10, 2024

I think it can be abandoned, since Zoran added a styrainc/regal upgrade in #1131.

Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 10, 2024

Looks like github.com/styrainc/regal is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Sep 10, 2024
@dependabot dependabot bot deleted the dependabot/go_modules/github.com/styrainc/regal-0.26.1 branch September 10, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants