Skip to content

feat: add severity levels and suppressions to the layer validator #21

Open

Description

@Statyk7

Description

Every validator finding is an error today: the hook exits 2 and blocks Claude. Several planned checks are judgment calls that should be reported without blocking, for example a presentation package that does not depend on its own feature's domain, or a repository interface that returns another feature's model.

Add severity levels and a way to suppress a finding with a stated reason, so the stricter checks can land without making the hook noisy.

Requirements

  • Each rule has a severity: error or warning.
  • Errors keep the current behavior: exit 2, and the hook blocks the edit.
  • Warnings are printed but the exit code stays 0 when there are no errors.
  • A finding can be suppressed with a comment that requires a reason, for example # ffca-ignore: <rule-id> — <reason> in the pubspec.yaml or // ffca-ignore: <rule-id> — <reason> in Dart. A suppression without a reason is itself an error. The pubspec form is in feat(validator): add severity levels and suppressions #30; the Dart form lands with feat: check imports and barrels in the layer validator #25, the first check that reads Dart files.
  • Each rule has a stable ID used in output and suppressions.
  • --all prints how many findings are suppressed.
  • Tests and fixtures cover both severities and suppression.
  • The Hooks section of README.md and the ## Hooks section of CLAUDE.md describe the new behavior.
  • All CI/CD checks are passing.
  • There is no drop in the test coverage percentage.

Additional Context

Prerequisite for the warning-level checks in the feature ownership, import and barrel, and type-level issues.

Activity

  1. self-assigned this
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureA new feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions