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

Rule: missing-metadata #1131

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Rule: missing-metadata #1131

merged 1 commit into from
Sep 24, 2024

Conversation

anderseknert
Copy link
Member

This rule is not for everyone, and hence in the custom category.

For a public projects, libraries and reusable policies, this should however be considered.

This uncovered a
bug in OPA, which has now been addressed. In order to make progress on this we're now depending on OPA main. This should be changed as soon as OPA v0.69.0 is released.

Some unrelated fixes in this PR, fixing annoyances as I worked on it:

  • add Regal specific attributes (input.regal.*) to the input created by the eval:use-as-input directive
  • Add another metadata snippet to allow creating a # METADATA block with only description and no title. Tbh, I'm still not sure what to use title for, while description is pretty much mandatory.
  • Set ignore-if-sub-attribute: true on default config for prefer-some-in-iteration rule. This was documented to be the case already, but seemed to have gone missing at some point.
  • Add pprof option to language-server command, and pprof handlers to web server

This rule is not for everyone, and hence in the `custom` category.

For a public projects, libraries and reusable policies, this should
however be considered.

This uncovered a
[bug in OPA](open-policy-agent/opa#7050), which has
now been addressed. In order to make progress on this we're now depending on
OPA `main`. This should be changed as soon as OPA v0.69.0 is released.

Some unrelated fixes in this PR, fixing annoyances as I worked on it:
- add Regal specific attributes (`input.regal.*`) to the input created by the
  `eval:use-as-input` directive
- Add another metadata snippet to allow creating a `# METADATA` block
  with only description and no title. Tbh, I'm still not sure what to
  use `title` for, while `description` is pretty much mandatory.
- Set `ignore-if-sub-attribute: true` on default config for
  `prefer-some-in-iteration` rule. This was documented to be the case
  already, but seemed to have gone missing at some point.
- Add pprof option to language-server command, and pprof handlers
  to web server

Signed-off-by: Anders Eknert <anders@styra.com>
@anderseknert anderseknert linked an issue Sep 24, 2024 that may be closed by this pull request
Copy link
Member

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, no comments. pprof is a nice addition :)

@anderseknert anderseknert merged commit f6f2f6d into main Sep 24, 2024
4 checks passed
@anderseknert anderseknert deleted the missing-metadata branch September 24, 2024 14:08
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
This rule is not for everyone, and hence in the `custom` category.

For a public projects, libraries and reusable policies, this should
however be considered.

This uncovered a
[bug in OPA](open-policy-agent/opa#7050), which has
now been addressed. In order to make progress on this we're now depending on
OPA `main`. This should be changed as soon as OPA v0.69.0 is released.

Some unrelated fixes in this PR, fixing annoyances as I worked on it:
- add Regal specific attributes (`input.regal.*`) to the input created by the
  `eval:use-as-input` directive
- Add another metadata snippet to allow creating a `# METADATA` block
  with only description and no title. Tbh, I'm still not sure what to
  use `title` for, while `description` is pretty much mandatory.
- Set `ignore-if-sub-attribute: true` on default config for
  `prefer-some-in-iteration` rule. This was documented to be the case
  already, but seemed to have gone missing at some point.
- Add pprof option to language-server command, and pprof handlers
  to web server

Signed-off-by: Anders Eknert <anders@styra.com>
charlieegan3 pushed a commit to charlieegan3/regal that referenced this pull request Jan 6, 2025
This rule is not for everyone, and hence in the `custom` category.

For a public projects, libraries and reusable policies, this should
however be considered.

This uncovered a
[bug in OPA](open-policy-agent/opa#7050), which has
now been addressed. In order to make progress on this we're now depending on
OPA `main`. This should be changed as soon as OPA v0.69.0 is released.

Some unrelated fixes in this PR, fixing annoyances as I worked on it:
- add Regal specific attributes (`input.regal.*`) to the input created by the
  `eval:use-as-input` directive
- Add another metadata snippet to allow creating a `# METADATA` block
  with only description and no title. Tbh, I'm still not sure what to
  use `title` for, while `description` is pretty much mandatory.
- Set `ignore-if-sub-attribute: true` on default config for
  `prefer-some-in-iteration` rule. This was documented to be the case
  already, but seemed to have gone missing at some point.
- Add pprof option to language-server command, and pprof handlers
  to web server

Signed-off-by: Anders Eknert <anders@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule: missing-metadata-annotation
2 participants