Skip to content

[M12] Establish lint rule registry and configuration contract #97

Description

@Teakowa

Parent: #89

Goal

Turn the existing hard-coded analyzer set into a stable, configurable Wright-owned lint rule framework without changing current findings unintentionally.

Context

wright-analyzer already has three analyses (min-wait-loop, duplicate-condition, expensive-loop-check) over WIR/CFG, but the current execution path constructs a fixed analysis list. M12 should first establish the product contract that later lint CLI, agent APIs, and stability rules can reuse.

Scope

  • Define stable rule identity and metadata: rule ID, default severity, summary, documentation/known-limit metadata, evidence/confidence classification where applicable.
  • Introduce a rule registry/execution layer over existing semantic/WIR/CFG services.
  • Migrate the existing three analyses behind that registry.
  • Add deterministic configuration for enabling/disabling rules and overriding severity.
  • Support bounded per-rule options only where a current rule actually requires them; do not design a generic configuration language speculatively.
  • Preserve source provenance/spans and structured findings.
  • Keep the contract suitable for CLI, embedding, and agent consumers without coupling it to a specific transport/harness.

Non-goals

Deliverables

  • Rule registry/execution contract.
  • Deterministic rule configuration model.
  • Existing three analyses migrated to the registry.
  • Regression tests proving findings and source locations remain stable.

Acceptance criteria

  • Existing analyzer findings execute through the registry rather than a hard-coded fixed array.
  • Stable rule IDs are exposed in structured findings.
  • Users/programmatic callers can deterministically enable/disable rules and override severity.
  • Existing three rules retain positive/negative regression coverage and do not gain unreviewed behavior changes.
  • Findings preserve source identity/spans where available.
  • Core API does not require a plugin host and does not depend on [v0.2 workshop-rs] Define Workshop catalog, locale, extension, and version boundaries #96 implementation.
  • Current CI is green at acceptance.

Relationships

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions