Skip to content

Honor strict warnings when using --quiet - #4153

Draft
itscloud0 wants to merge 2 commits into
mkdocs:masterfrom
itscloud0:fix-4126-quiet-strict-warnings
Draft

Honor strict warnings when using --quiet#4153
itscloud0 wants to merge 2 commits into
mkdocs:masterfrom
itscloud0:fix-4126-quiet-strict-warnings

Conversation

@itscloud0

Copy link
Copy Markdown

Summary

Fixes #4126.

--quiet previously raised the mkdocs logger level to ERROR, which meant build warnings never reached the strict-mode warning counter. This changes --quiet to filter only the CLI stream handler, so warning records can still be counted while warning output remains quiet.

Test Plan

  • uv run --python 3.11 --with-editable . python -m unittest mkdocs.tests.cli_tests.CLITests.test_build_quiet mkdocs.tests.cli_tests.CLITests.test_build_quiet_strict_counts_warnings mkdocs.tests.cli_tests.CLITests.test_build_strict
  • uv run --python 3.11 --with-editable . python -m unittest mkdocs.tests.cli_tests
  • uv run --python 3.11 --with black==23.12.1 black --check mkdocs/__main__.py mkdocs/tests/cli_tests.py
  • uv run --python 3.11 --with isort==5.13.2 isort --check-only --diff mkdocs/__main__.py mkdocs/tests/cli_tests.py
  • uv run --python 3.11 --with black==23.12.1 --with isort==5.13.2 --with ruff==0.1.14 ruff check mkdocs/__main__.py mkdocs/tests/cli_tests.py

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.

Not possible to silence output while still honoring strict setting

1 participant