Skip to content

feat(cli): scope check, JSON for lint/verify, lint granularity warnings#24

Merged
Connorrmcd6 merged 1 commit into
mainfrom
cli-dx-issues-1-2-6
Jun 7, 2026
Merged

feat(cli): scope check, JSON for lint/verify, lint granularity warnings#24
Connorrmcd6 merged 1 commit into
mainfrom
cli-dx-issues-1-2-6

Conversation

@Connorrmcd6

Copy link
Copy Markdown
Owner

Implements issues #1, #2, and #6. No version bump / release.

#1check scoping (closes #1)

  • --files <globs> evaluates only claims whose anchored file(s) match.
  • An explicit --base <ref> diff-scopes to claims whose files changed (merge-base..working-tree) and drives advisory enrichment.
  • Omitting --base keeps a full check with HEAD enrichment; a bad ref / non-repo falls back to a full check rather than checking nothing.

#2--format json for lint and verify (closes #2)

  • Shared Format enum extracted into format.rs.
  • lint findings serialize directly; verify gains a structured VerifyReport (stamped/followed/unchanged/skipped + counts) while preserving its file-stamping side effects.

#6 — lint granularity warnings, advisory/never-blocking (§8) (closes #6)

  • Near-whole-file anchor spans, hubs with too many anchors, and public functions in an anchored file that no claim covers.
  • Adds surf_core::public_fns — top-level public functions only (pub(crate) and data types excluded to avoid over-anchoring noise). On this repo it surfaces 10 genuinely undocumented public functions; warnings only, exit 0.

Dogfooding

Hubs updated to document the new behavior and re-sealed; surf check is green, surf lint exits 0 (warnings only).

Verification

cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, and the full test suite all pass (9 new tests).

🤖 Generated with Claude Code

Implements issues #1, #2, and #6 — no version bump / release.

#1 check scoping: --files <globs> and diff-scoping via an explicit --base
(merge-base..working-tree). Omitting --base keeps a full check with
HEAD enrichment; a bad ref / non-repo falls back to full check.

#2 --format json for lint and verify, mirroring check. Extracts the shared
Format enum into format.rs; lint findings serialize directly; verify gains a
structured VerifyReport while keeping its file-stamping side effects.

#6 advisory lint granularity warnings (never block, §8): near-whole-file
anchor spans, hubs with too many anchors, and public functions in an anchored
file that no claim covers. Adds surf_core::public_fns (top-level public
functions only — pub(crate) and data types excluded to avoid over-anchoring
noise).

Hubs updated to document the new behavior and re-sealed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Connorrmcd6 Connorrmcd6 merged commit 48be70b into main Jun 7, 2026
2 checks passed
@Connorrmcd6 Connorrmcd6 deleted the cli-dx-issues-1-2-6 branch June 7, 2026 07:11
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.

lint: granularity guidance (over/under-anchoring) lint & verify: add --format json check: scope to changed files (--files / --base diff)

1 participant