Skip to content

Include rule docs links in metadata#1935

Merged
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
anderseknert:rule-docs-meta
Apr 7, 2026
Merged

Include rule docs links in metadata#1935
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
anderseknert:rule-docs-meta

Conversation

@anderseknert
Copy link
Copy Markdown
Member

This makes rules more self-contained / declarative, and will benefit a future "regodoc" renderer. Related to that, also replace use of config.docs.resolve_url in tests in favor of static URLs. Dynamically resolving doc URLs wasn't ever needed tbh, and having tests compare against static data feels much better.

Also some style fixes to unify how location data is presented in tests.

While there are many changes here, it's mostly repeating the same changes everywhere, so don't spend much time reviewing this.

Fixes #1927

This makes rules more self-contained / declarative, and will benefit
a future "regodoc" renderer. Related to that, also replace use of
config.docs.resolve_url in tests in favor of static URLs. Dynamically
resolving doc URLs wasn't ever needed tbh, and having tests compare
against static data feels much better.

Also some style fixes to unify how location data is presented in tests.

While there are many changes here, it's mostly repeating the same changes
everywhere, so don't spend much time reviewing this.

Fixes open-policy-agent#1927

Signed-off-by: Anders Eknert <anders.eknert@apple.com>
Copy link
Copy Markdown
Contributor

@SeanLedford SeanLedford left a comment

Choose a reason for hiding this comment

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

LGTM

@anderseknert
Copy link
Copy Markdown
Member Author

It would have been nice to wipe config.docs.resolve_url, but since it's been mentioned in the custom rules docs, there are likely users that depend on it.

@anderseknert anderseknert added this pull request to the merge queue Apr 7, 2026
Merged via the queue into open-policy-agent:main with commit 6fd115a Apr 7, 2026
11 of 15 checks passed
@anderseknert anderseknert deleted the rule-docs-meta branch April 7, 2026 17:04
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.

Add related_resources metadata to all rule packages linking to rule docs

3 participants