Skip to content

feat(enrichment): non-inclusive / banned-terminology analyzer #2031

Description

@JSONbored

New REES local analyzer that flags non-inclusive terminology newly added in identifiers/comments (whitelist/blacklist, master/slave, etc.) and suggests the neutral replacement — a config-driven house-style signal. Pure compute over added lines, no network; the term→replacement map is a bounded in-file table so self-host operators can reason about it.

Deliverables

  • Add TerminologyFinding ({ file, line, term: string, suggestion: string }) + terminology? key to review-enrichment/src/types.ts
  • Create review-enrichment/src/analyzers/terminology.ts: word-boundary match added lines against a bounded term→suggestion table; skip URLs and known-technical exceptions where cheap; cap with maxFindings
  • Register a local descriptor (category 'quality', cost 'local', requires ['files']) with inline render() in review-enrichment/src/analyzers/registry.ts
  • Add review-enrichment/test/terminology.test.ts covering a flagged term with its suggestion, word-boundary correctness (no substring false positive), and the cap

References

  • review-enrichment/src/analyzers/actions-pin.ts (added-line scan template)
  • review-enrichment/src/analyzers/registry.ts:158-175
  • review-enrichment/src/types.ts:289-311

Part of #1499.


size: XS · gittensor:bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions