Skip to content

Simplify spacing requirements for rego format - #6730

Open
evankanderson wants to merge 1 commit into
mindersec:mainfrom
evankanderson:easier-rego-metadata
Open

Simplify spacing requirements for rego format#6730
evankanderson wants to merge 1 commit into
mindersec:mainfrom
evankanderson:easier-rego-metadata

Conversation

@evankanderson

Copy link
Copy Markdown
Member

Summary

Currently, mindev test (particularly on Windows) is very picky about rego format files. (It requires at least one space even on blank comment lines.) Handle windows newlines in body correctly and accept completely-empty comment lines (which otherwise break multi-paragraph guidance and other text blocks).

Testing

Tested manually while converting rules to Rego using the pattern:

  1. Relocate rego to end of file, remove indents
  2. Comment entire previous file
  3. Add # METADATA comment
  4. Remove unnecessary entries (apiVersion, type, name, def.eval.rego.def, etc)

@evankanderson
evankanderson requested a review from a team as a code owner August 31, 2026 13:13
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 61.772% (-0.006%) from 61.778% — evankanderson:easier-rego-metadata into mindersec:main

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.

2 participants