doctor: surface settings resolution problems as warnings - #164
Merged
Conversation
Expand doctor's config line to all five settings and their sources, and add three new [warn] conditions: dedicated-file + pyproject table both present, repo_root falling back to cwd with no .git found, and a promoted setting's value being invalid and falling back to default. All are warnings, matching the existing severity split (never gate report.ok / exit 1).
Contributor
|
Contributor
|
Version hint: patch Comment ID: Display version hint-auto-generated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
doctor's config line now reports all five settings (docs_dir, repo_root, branch_prefix, batch_byte_cap, batch_file_cap) and each field's resolution source, not just docs_dir.[warn]conditions, matching the existing severity split (warnings, notreport.ok/exit-1 failures):.wiki-toolkit.tomlandpyproject.toml's[tool.wiki_toolkit]table presentrepo_rootresolution failed (no.gitfound walking up) and fell back tocwdsettings.pygets a newdiagnose_settings()used only bydoctor;build_context()'s public signature is unchanged.Closes #159.
Test plan
pytest(276 passed)ruff check,mypyclean on changed filesrun_doctor()/DoctorReportfor each new warning condition (tests/test_doctor.py)tests/test_cli.py)doctorconsole example indocs/tutorials/index.mdto match the new output shape