Skip to content

refactor(auditor): split rules into smaller modules#92

Merged
RealZST merged 1 commit into
RealZST:mainfrom
Orchardxyz:refactor/split-auditor-rules
Jun 26, 2026
Merged

refactor(auditor): split rules into smaller modules#92
RealZST merged 1 commit into
RealZST:mainfrom
Orchardxyz:refactor/split-auditor-rules

Conversation

@Orchardxyz

Copy link
Copy Markdown
Contributor

Summary

Refactor crates/hk-core/src/auditor/rules.rs into a directory-based module layout for better readability and long-term maintainability.

This change keeps behavior unchanged while breaking a large file into
smaller focused modules:

  • content.rs
  • permissions.rs
  • cli.rs
  • mcp.rs
  • plugin.rs
  • shared.rs
  • test_support.rs

The rules.rs file remains the public entrypoint and still assembles
all_rules() in the same order.

Motivation

rules.rs had grown large enough to be harder to navigate and review. Splitting it into smaller modules makes the audit rules easier to maintain, extend, and test over time.

Verification

  • Run cargo test -p hk-core auditor --locked
  • Run npm test -- src/pages/__tests__/audit-utils.test.ts

Notes

This PR is intended as a structural refactor only.
No functional changes are intended.

@RealZST RealZST force-pushed the refactor/split-auditor-rules branch from a8f4d09 to ae863bc Compare June 26, 2026 19:01
@RealZST RealZST merged commit 6fc8731 into RealZST:main Jun 26, 2026
3 checks passed
@RealZST

RealZST commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Merged. Thanks!

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