Skip to content

refactor(linter): make rule execution declarative - #58

Merged
melonamin merged 1 commit into
masterfrom
bb/make-linter-rules-declarative-thr_bcg8cjup8s
Aug 12, 2026
Merged

refactor(linter): make rule execution declarative#58
melonamin merged 1 commit into
masterfrom
bb/make-linter-rules-declarative-thr_bcg8cjup8s

Conversation

@melonamin

Copy link
Copy Markdown
Member

What changed

  • pass dialect, token, and templating metadata through immutable rule contexts
  • register each lint rule with declarative engine, scope/source, dialect, quality, and fallback metadata
  • schedule and filter rules from descriptors instead of rule-code switches
  • preserve the public lint configuration, LintContext, LintRule, and diagnostic contracts
  • add architecture tests for descriptor completeness, filtering, context isolation, compatibility, and fallback behavior

Why

Rule execution metadata and scheduling policy were split between thread-local state and centralized rule-code switches. This made nested execution implicit and required scheduler edits whenever a rule changed.

Validation

  • cargo fmt --all -- --check
  • focused linter architecture tests
  • cargo test -p flowscope-core
  • cargo clippy -p flowscope-core --lib -- -D warnings
  • codex review --uncommitted

@melonamin
melonamin marked this pull request as ready for review August 12, 2026 13:06
@melonamin
melonamin merged commit 8b1fb45 into master Aug 12, 2026
7 checks passed
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.

1 participant