Skip to content

Fix --quiet disabling strict mode - #101

Merged
shenxianpeng merged 2 commits into
mainfrom
fix/quiet-strict
Sep 24, 2026
Merged

shenxianpeng merged 2 commits into
mainfrom
fix/quiet-strict

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

mkdocs build --quiet --strict (or --quiet with strict: true in the config) exited with status 0 even when the build produced warnings, so broken links could slip through CI unnoticed.

Root cause: --quiet lowered the level of the whole mkdocs logger to ERROR. Warnings were discarded before they reached the handler that strict mode uses to count them.

Fix: raise the level of the console stream handler instead. Warnings are still emitted and counted, so strict mode aborts as expected, and the output stays quiet — only Aborted with N warnings in strict mode! is printed. The same fix also applies to mkdocs get-deps --quiet, which relied on the same counter.

Related Issue

No issue in this repository.

Checklist

  • New tests added for new behavior (if applicable)
  • Documentation updated (if applicable)
  • Release notes docs/about/release-notes.md updated (if applicable)

🤖 Generated with Claude Code

shenxianpeng and others added 2 commits September 24, 2026 11:17
`--quiet` lowered the level of the whole `mkdocs` logger to ERROR, so
warnings were discarded before the strict-mode warning counter could see
them. As a result `mkdocs build --quiet --strict` (or `--quiet` with
`strict: true` in the config) exited with status 0 even when there were
warnings, letting broken links slip through CI.

Raise the level of the console stream handler instead, so warnings are
still emitted and counted but not printed.

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working label Sep 24, 2026
@codspeed

codspeed Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 28 untouched benchmarks


Comparing fix/quiet-strict (f2bbd16) with main (80ed7ce)

Open in CodSpeed

@shenxianpeng
shenxianpeng merged commit bd084e4 into main Sep 24, 2026
23 checks passed
@shenxianpeng
shenxianpeng deleted the fix/quiet-strict branch September 24, 2026 08:42
This was referenced Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant