Skip to content

feat(cli): add --quiet flag and dual-register --verbose on check subcommand - #144

Merged
Alberto-Codes merged 3 commits into
mainfrom
feat/cli-21-3-verbose-quiet-flags
Feb 26, 2026
Merged

feat(cli): add --quiet flag and dual-register --verbose on check subcommand#144
Alberto-Codes merged 3 commits into
mainfrom
feat/cli-21-3-verbose-quiet-flags

Conversation

@Alberto-Codes

Copy link
Copy Markdown
Owner

Adds three-tier verbosity control (quiet/default/verbose) to the check subcommand. Previously, --verbose only worked before the subcommand name and there was no way to suppress non-finding output.

  • Add -q/--quiet flag to app callback and check subcommand with OR-resolution across positions
  • Dual-register --verbose on check so both docvet --verbose check and docvet check --verbose work identically
  • Gate all stderr metadata (summary, timing, verbose header, file count) behind quiet check; quiet wins over verbose
  • Add quiet parameter to _run_griffe for forward compatibility with Story 21.4
  • Fix verbose/quiet dual-resolution ordering so _discover_and_handle sees resolved flags (code review finding)
  • Add 15 tests covering all ACs and edge cases; strengthen AC1/AC2 verbose assertions

Test: uv run pytest

Closes #144

fix(cli): resolve verbose/quiet dual-resolution ordering in check command


PR Review

Checklist

  • Self-reviewed my code
  • Tests pass (uv run pytest)
  • Lint passes (uv run ruff check .)
  • Types pass (uv run ty check)
  • Breaking changes use ! in title and BREAKING CHANGE: in body

Review Focus

  • The dual-resolution ordering fix in check() — verbose/quiet flags now resolve before _discover_and_handle so subcommand-level flags affect file count output
  • Quiet-wins-over-verbose precedence across all flag positions

Related

…ommand

Implement three-tier verbosity control (quiet/default/verbose) for the
check command. Add -q/--quiet to both the app callback and check
subcommand, dual-register --verbose on check so it works in both
positions, and gate all stderr metadata behind quiet checks.

- Add -q/--quiet flag to app callback and check subcommand
- Dual-register --verbose on check with OR-resolution from both positions
- Gate summary line, per-check timing, verbose header, and file count
- Quiet wins over verbose when both specified
- Add quiet parameter to _run_griffe for forward compatibility
- Add 15 new tests, update 2 existing tests (860 total)
…mand

Move verbose/quiet dual-resolution before _discover_and_handle call so
subcommand-level flags take effect for file count output. Strengthen
AC1/AC2 verbose tests to assert per-check timing and file count.
@Alberto-Codes
Alberto-Codes marked this pull request as ready for review February 26, 2026 21:34
Copilot AI review requested due to automatic review settings February 26, 2026 21:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds three-tier verbosity control (quiet/default/verbose) to the docvet check command by introducing a --quiet/-q flag and by making --verbose work both before and after the subcommand name via dual-registration and OR-resolution.

Changes:

  • Add -q/--quiet to the app callback and to check, and resolve verbosity flags across positions (docvet -q check and docvet check -q).
  • Gate non-finding stderr metadata (verbose header, file count, per-check timing, summary) behind quiet (quiet wins over verbose).
  • Add/update unit tests to cover verbose/quiet combinations and ensure _run_griffe receives the new quiet kwarg.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/docvet/cli.py Implements --quiet, dual-registers --verbose on check, resolves flags into ctx.obj, and gates stderr metadata accordingly.
tests/unit/test_cli.py Updates existing assertions for _run_griffe(…, quiet=…) and adds new tests for quiet/verbose behavior and help output.
_bmad-output/implementation-artifacts/sprint-status.yaml Marks Story 21.3 as done.
_bmad-output/implementation-artifacts/21-3-verbose-and-quiet-flag-redesign.md Adds the completed implementation artifact and AC-to-test mapping for Story 21.3.

Comment thread src/docvet/cli.py
Comment thread src/docvet/cli.py
@Alberto-Codes
Alberto-Codes merged commit 206ab22 into main Feb 26, 2026
8 checks passed
@Alberto-Codes
Alberto-Codes deleted the feat/cli-21-3-verbose-quiet-flags branch February 26, 2026 21:46
Alberto-Codes added a commit that referenced this pull request Feb 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.5.0](v1.4.0...v1.5.0)
(2026-02-26)


### Features

* **cli:** add --quiet flag and dual-register --verbose on check
subcommand ([#144](#144))
([206ab22](206ab22))
* **cli:** add --verbose and --quiet flags to individual subcommands
([#145](#145))
([ba1bbd5](ba1bbd5))
* **cli:** replace Completed-in with Vetted summary line
([#141](#141))
([18db009](18db009))
* **cli:** replace Completed-in with Vetted summary line on check
([18db009](18db009))
* **config:** suppress overlap warnings for default warn-on values
([#143](#143))
([384a44a](384a44a))


### Bug Fixes

* **cli:** correct --quiet flag docs and harden griffe quiet test
([#146](#146))
([bf1ca08](bf1ca08))
* **cli:** resolve verbose/quiet dual-resolution ordering in check
([206ab22](206ab22))
* **cli:** suppress verbose header for single-check subcommands
([ba1bbd5](ba1bbd5))
* **config:** update overlap warning docs and strengthen AC3 test
([384a44a](384a44a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

3 participants