Skip to content

Changed files and baselines

Keep local and pull-request feedback focused without hiding failures.

Changed-file mode

Use --changed with checks, formatting, or fixes:

quality check --changed
quality check --changed origin/main
quality format --changed
quality fix --changed

In CI, reporting and failure thresholds can be tuned separately:

quality check --changed origin/main \
  --report-level warning \
  --fail-level error

Without a base, quality includes staged, unstaged, and untracked files. With a base, it also includes branch changes since that revision.

Configuration changes trigger the corresponding full analyzer because a rules change can affect files that were not edited. Project-wide analyzers also retain their required project scope.

Deleted paths participate in relevance checks. Deleting an analyzer configuration triggers a full run, and deleting a source file still triggers matching project-wide tasks and analyzers. File-scoped tools receive only paths that still exist, so a deleted file is never passed to an executable.

Adapter selection composes with changed-file mode:

quality check --changed origin/main --only eslint,astro-check
quality format --changed --exclude swiftformat

Baseline an existing repository

Create a baseline after verifying every required tool is installed and runs successfully:

quality baseline create
git add .quality-baseline.json quality.yml

Existing matching findings are suppressed on later checks; new findings still fail.

Fingerprints exclude line and column positions, so moving code does not create noise. Duplicate occurrences are counted, which means adding another copy of an existing violation is still detected.

Safety rules

A baseline is refused when a required tool is missing, crashes, or returns output that cannot be fully parsed. Infrastructure failures must never become accepted code-quality debt.