feat(xatu): add lint architecture #71

Merged
alexion merged 1 commits from feat/xatu-lint-architecture into main 2026-09-18 20:58:41 -04:00
Owner

Summary

  • add Xatu file store, finding model, parser wrappers, node-rule dispatch, and compact reporting
  • report parse errors through the same finding stream as lint rules
  • add the empty_inherit rule with behavior tests

Validation

  • cargo fmt -p xatu --check
  • cargo check -p xatu
  • bazel test //src/xatu:xatu_test
  • bazel build //src/xatu:xatu
## Summary - add Xatu file store, finding model, parser wrappers, node-rule dispatch, and compact reporting - report parse errors through the same finding stream as lint rules - add the `empty_inherit` rule with behavior tests ## Validation - `cargo fmt -p xatu --check` - `cargo check -p xatu` - `bazel test //src/xatu:xatu_test` - `bazel build //src/xatu:xatu`
Author
Owner

Addressed the architecture feedback in follow-up commit 9ba33c3e7.

Changes:

  • split xatu.rs into explicit architecture modules:
    • file_store.rs
    • syntax.rs
    • finding.rs
    • node_rule.rs
    • rules.rs
    • rules/empty_inherit.rs
    • reporting.rs
  • moved empty_inherit logic out of the syntax wrapper; the wrapper now exposes has_attrs / attr_count, and the rule decides whether to report
  • changed compact output to severity[rule_id]: message
  • replaced string rule IDs with typed RuleId and RuleMetadata
  • removed severity lookup by string; reporting uses structured finding metadata
  • kept parse errors in the finding stream and preserved exit policy

Validation:

  • cargo fmt -p xatu
  • cargo check -p xatu
  • bazel test //src/xatu:xatu_test
  • bazel build //src/xatu:xatu
Addressed the architecture feedback in follow-up commit `9ba33c3e7`. Changes: - split `xatu.rs` into explicit architecture modules: - `file_store.rs` - `syntax.rs` - `finding.rs` - `node_rule.rs` - `rules.rs` - `rules/empty_inherit.rs` - `reporting.rs` - moved `empty_inherit` logic out of the syntax wrapper; the wrapper now exposes `has_attrs` / `attr_count`, and the rule decides whether to report - changed compact output to `severity[rule_id]: message` - replaced string rule IDs with typed `RuleId` and `RuleMetadata` - removed severity lookup by string; reporting uses structured finding metadata - kept parse errors in the finding stream and preserved exit policy Validation: - `cargo fmt -p xatu` - `cargo check -p xatu` - `bazel test //src/xatu:xatu_test` - `bazel build //src/xatu:xatu`
alexion added 1 commit 2026-09-18 20:57:42 -04:00
alexion force-pushed feat/xatu-lint-architecture from c02a52b36b to 11f1eba26f 2026-09-18 20:57:42 -04:00 Compare
alexion merged commit 11f1eba26f into main 2026-09-18 20:58:41 -04:00
alexion deleted branch feat/xatu-lint-architecture 2026-09-18 20:58:42 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/dev#71