docs: Comprehensive documentation improvements with CLI reference enhancements#2681
docs: Comprehensive documentation improvements with CLI reference enhancements#2681
Conversation
|
Warning Rate limit exceeded@koxudaxi has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 32 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughThis PR reorganizes and expands documentation, adds manual/utility CLI docs and top-of-file metadata tags, updates mkdocs navigation, and extends the docs build tooling to detect and integrate manual docs. It also renames/aliases a CLI-docs constant to Changes
Sequence Diagram(s)sequenceDiagram
participant Docs as Markdown files
participant Build as scripts/build_cli_docs.py
participant CLIOpts as src/datamodel_code_generator/cli_options.py
participant Site as Generated docs (mkdocs)
Docs->>Build: scan for <!-- related-cli-options: ... --> tags
Build->>CLIOpts: import MANUAL_DOCS & MANUAL_OPTION_DESCRIPTIONS
Build->>Build: read_manual_docs() -> manual_docs
Build->>Build: scan_docs_for_cli_option_tags() -> option_related_pages
Build->>Build: generate_manual_docs_section(manual_docs)
Build->>Build: generate_index_page(..., manual_docs)
Build->>Build: generate_quick_reference(..., manual_docs)
Build->>Site: write_or_check utility-options.md and updated category pages
Note right of Site: mkdocs.yaml nav entries updated for Utility Options & Integration
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
for more information, see https://pre-commit.ci
CodSpeed Performance ReportMerging #2681 will not alter performanceComparing Summary
Footnotes
|
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/cli-reference/general-options.md (1)
1238-1245: Minor typo in pyproject link textThe link text reads
pyprojecttoml Configurationbut should likely bepyproject.toml Configurationto match the page title and other docs, while keeping the target../pyproject_toml.md.
🧹 Nitpick comments (6)
docs/model-reuse.md (3)
91-91: Add language specifiers to fenced code blocks.Multiple code blocks are missing language specifiers (e.g.,
bash,python). This improves readability and syntax highlighting in documentation.🔎 Example fixes for code block language specifiers:
- Line 91: - ``` + ``` + models/ ├── __init__.py ├── user.py # imports from shared ├── order.py # imports from shared └── shared.py # SharedModel defined once - ``` + ``` - Line 98: - ``` + ```python # models/user.py from .shared import SharedModel ... - ``` + ``` - Similarly for lines 131, 226, 235: add appropriate language tagsAs per markdownlint standards, fenced code blocks should specify a language for proper syntax highlighting.
Also applies to: 98-98, 131-131, 226-226, 235-235
216-216: Consider indented code block style in admonition.Line 216 uses indented code formatting within a
!!! tipadmonition. Verify this is intentional, as the linter expects fenced code blocks. If this is part of an admonition, the current format may be acceptable, but consider updating for consistency.
214-214: Replace weak intensifier "very" with more specific language.Line 214 uses "very large schemas"—consider replacing with a more precise term (e.g., "massive," "complex," "thousands-of-definitions schemas").
tests/cli_doc/test_cli_options_sync.py (1)
3-7: Update summary docstring to match MANUAL_DOCS terminologyThe bullets still reference
EXCLUDED_FROM_DOCS, but the tests and implementation now useMANUAL_DOCS. Please update items 2 and 3 to mentionMANUAL_DOCSso the description matches the actual checks.docs/cli-reference/general-options.md (1)
1392-1399: Apply samepyproject.tomlspelling in other “See also” linksThe same
pyprojecttoml Configurationtext appears in other “See also” lines; consider standardizing them topyproject.toml Configurationfor consistency.Also applies to: 1600-1607
scripts/build_cli_docs.py (1)
657-660: Remove unnecessary emptypassstatement.Line 659 contains an empty
passstatement that serves no purpose. If this is meant to be a placeholder for future validation logic, add a comment; otherwise, remove the conditional block entirely.🔎 Apply this diff:
schema_version = collection.get("schema_version", 0) - if schema_version != 1: - pass - items = collection.get("items", [])
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (33)
README.md(2 hunks)docs/aliases.md(1 hunks)docs/ci-cd.md(1 hunks)docs/cli-reference/field-customization.md(4 hunks)docs/cli-reference/general-options.md(6 hunks)docs/cli-reference/index.md(6 hunks)docs/cli-reference/manual/debug.md(1 hunks)docs/cli-reference/manual/help.md(1 hunks)docs/cli-reference/manual/no-color.md(1 hunks)docs/cli-reference/manual/profile.md(1 hunks)docs/cli-reference/manual/version.md(1 hunks)docs/cli-reference/model-customization.md(8 hunks)docs/cli-reference/openapi-only-options.md(1 hunks)docs/cli-reference/quick-reference.md(5 hunks)docs/cli-reference/template-customization.md(6 hunks)docs/cli-reference/utility-options.md(1 hunks)docs/custom-formatters.md(1 hunks)docs/custom_template.md(1 hunks)docs/faq.md(1 hunks)docs/field-constraints.md(1 hunks)docs/formatting.md(1 hunks)docs/index.md(1 hunks)docs/model-reuse.md(1 hunks)docs/oneliner.md(1 hunks)docs/pyproject_toml.md(1 hunks)docs/what_is_the_difference_between_v1_and_v2.md(1 hunks)mkdocs.yaml(1 hunks)scripts/build_cli_docs.py(13 hunks)src/datamodel_code_generator/cli_options.py(3 hunks)tests/cli_doc/test_cli_doc_coverage.py(3 hunks)tests/cli_doc/test_cli_options_sync.py(3 hunks)tests/conftest.py(2 hunks)tests/main/jsonschema/test_main_jsonschema.py(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
scripts/build_cli_docs.py (1)
src/datamodel_code_generator/cli_options.py (4)
OptionCategory(18-27)get_canonical_option(245-256)get_option_meta(280-292)is_manual_doc(265-268)
tests/cli_doc/test_cli_doc_coverage.py (1)
src/datamodel_code_generator/cli_options.py (1)
get_all_canonical_options(260-262)
🪛 LanguageTool
docs/cli-reference/general-options.md
[style] ~1681-~1681: Using many exclamation marks might seem excessive (in this case: 33 exclamation marks for a text that’s 7574 characters long)
Context: ... and Deduplication](../model-reuse.md) !!! tip "Usage" ```bash datamodel-...
(EN_EXCESSIVE_EXCLAMATION)
docs/ci-cd.md
[style] ~193-~193: Using many exclamation marks might seem excessive (in this case: 12 exclamation marks for a text that’s 3170 characters long)
Context: ...generator files: ^schemas/ ``` !!! note "Installing the hook" Ensure `...
(EN_EXCESSIVE_EXCLAMATION)
docs/cli-reference/manual/debug.md
[style] ~15-~15: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 279 characters long)
Context: ...--debug - the option documented here !!! warning "Requires extra dependency" ...
(EN_EXCESSIVE_EXCLAMATION)
docs/cli-reference/openapi-only-options.md
[style] ~930-~930: Using many exclamation marks might seem excessive (in this case: 15 exclamation marks for a text that’s 3552 characters long)
Context: ... Constraints](../field-constraints.md) !!! tip "Usage" ```bash datamodel-...
(EN_EXCESSIVE_EXCLAMATION)
docs/cli-reference/utility-options.md
[style] ~148-~148: Using many exclamation marks might seem excessive (in this case: 21 exclamation marks for a text that’s 1680 characters long)
Context: ...d version of datamodel-code-generator. !!! tip "Usage" ```bash datamodel-...
(EN_EXCESSIVE_EXCLAMATION)
docs/cli-reference/manual/no-color.md
[style] ~16-~16: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 300 characters long)
Context: ...no-color` - the option documented here !!! note "Environment variable" You ca...
(EN_EXCESSIVE_EXCLAMATION)
docs/oneliner.md
[style] ~201-~201: Using many exclamation marks might seem excessive (in this case: 15 exclamation marks for a text that’s 2716 characters long)
Context: ...enerator` | Traditional installation | !!! tip "When to use each method" - **u...
(EN_EXCESSIVE_EXCLAMATION)
docs/cli-reference/manual/profile.md
[style] ~9-~9: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 383 characters long)
Context: ...onfiguration](../../pyproject_toml.md) !!! tip "Usage" ```bash datamodel-...
(EN_EXCESSIVE_EXCLAMATION)
docs/cli-reference/manual/version.md
[style] ~6-~6: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 168 characters long)
Context: ...d version of datamodel-code-generator. !!! tip "Usage" ```bash datamodel-...
(EN_EXCESSIVE_EXCLAMATION)
docs/cli-reference/manual/help.md
[style] ~8-~8: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 207 characters long)
Context: ...and default values. Aliases: -h !!! tip "Usage" ```bash datamodel-...
(EN_EXCESSIVE_EXCLAMATION)
docs/model-reuse.md
[style] ~214-~214: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...on | !!! tip "Performance tip" For very large schemas, combine --reuse-model with `...
(EN_WEAK_ADJECTIVE)
🪛 markdownlint-cli2 (0.18.1)
docs/cli-reference/general-options.md
1170-1170: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1170-1170: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1244-1244: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1244-1244: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1364-1364: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1364-1364: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1398-1398: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1398-1398: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1606-1606: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1606-1606: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1680-1680: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1680-1680: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
docs/oneliner.md
76-76: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
86-86: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
101-101: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
111-111: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
121-121: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
175-175: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
docs/model-reuse.md
91-91: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
98-98: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
131-131: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
216-216: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
226-226: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
235-235: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/index.md
149-149: Code block style
Expected: indented; Actual: fenced
(MD046, code-block-style)
🪛 Ruff (0.14.8)
tests/cli_doc/test_cli_options_sync.py
47-47: Unused noqa directive (non-enabled: PLR6301)
Remove unused noqa directive
(RUF100)
59-59: Unused noqa directive (non-enabled: PLR6301)
Remove unused noqa directive
(RUF100)
scripts/build_cli_docs.py
222-222: Unused noqa directive (non-enabled: PLR0912, PLR0914, PLR0915)
Remove unused noqa directive
(RUF100)
725-725: Unused noqa directive (non-enabled: T201)
Remove unused noqa directive
(RUF100)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
- GitHub Check: py312-isort6 on Ubuntu
- GitHub Check: 3.12 on Ubuntu
- GitHub Check: py312-isort7 on Ubuntu
- GitHub Check: py312-pydantic1 on Ubuntu
- GitHub Check: py312-black23 on Ubuntu
- GitHub Check: py312-black22 on Ubuntu
- GitHub Check: 3.9 on Ubuntu
- GitHub Check: 3.11 on Ubuntu
- GitHub Check: py312-isort5 on Ubuntu
- GitHub Check: 3.10 on Ubuntu
- GitHub Check: 3.10 on macOS
- GitHub Check: 3.14 on Ubuntu
- GitHub Check: 3.13 on Ubuntu
- GitHub Check: 3.13 on macOS
- GitHub Check: dev
- GitHub Check: type
- GitHub Check: docs
- GitHub Check: pkg_meta
- GitHub Check: benchmarks
- GitHub Check: Analyze (python)
🔇 Additional comments (49)
docs/cli-reference/openapi-only-options.md (1)
929-929: Verify relative link path to field-constraints documentation.The "See also" reference uses a relative path
../field-constraints.md. Please confirm thatdocs/field-constraints.mdexists and the link is valid given the file structure.docs/aliases.md (1)
1-1: Metadata comment format is consistent.The related-cli-options metadata follows the established pattern. Ensure the metadata list matches the actual CLI options documented or referenced in this file.
docs/formatting.md (1)
1-1: Metadata comment appropriately identifies formatter-related CLI option.The single related-cli-option (--formatters) is accurate for this formatting guide. Metadata placement and format are consistent with other documentation files.
docs/cli-reference/template-customization.md (6)
474-474: Verify relative link to custom-formatters documentation.The "See also" reference at line 474 uses
../custom-formatters.md. Confirm this file exists in thedocs/directory relative todocs/cli-reference/template-customization.md.
550-550: Verify relative link path consistency.Two references to
../custom-formatters.mdappear in this file (lines 474 and 550). Ensure the path is consistent and valid.
612-612: Verify relative link to custom templates documentation.The "See also" reference uses
../custom_template.md(with underscore). Confirm the filename is correct and the file exists.
1223-1223: Verify relative link to CI/CD integration documentation.The "See also" reference at line 1223 uses
../ci-cd.md. Confirm this file exists in thedocs/directory and the link is valid.
1572-1572: Verify relative link to custom templates documentation (second occurrence).Another "See also" reference to
../custom_template.mdat line 1572. Ensure consistency with the path used elsewhere in this file and verify the file exists.
1934-1934: Verify multiple relative links in consolidated reference section.Line 1934 contains two "See also" links to
../formatting.mdand../ci-cd.md. Confirm both files exist at those relative paths.docs/cli-reference/manual/debug.md (1)
1-22: New utility option documentation is well-structured and informative.The
--debugdocumentation clearly explains the option's purpose, includes practical usage examples, and warns users about the requireddebugextra dependency. The structure and formatting are consistent with other documentation in the project.docs/pyproject_toml.md (1)
1-1: Related CLI options metadata is accurate and comprehensive.The four listed options (--ignore-pyproject, --generate-pyproject-config, --generate-cli-command, --profile) are all appropriately related to pyproject.toml configuration and appear in the file content.
docs/cli-reference/manual/no-color.md (1)
1-23: New utility option documentation provides clear guidance with environment variable support.The
--no-colordocumentation effectively explains the option, provides usage examples, and importantly documents theNO_COLORenvironment variable alternative. This is practical information for users integrating with CI/CD systems.docs/cli-reference/manual/version.md (1)
1-19: New utility option documentation is concise and complete.The
--versiondocumentation appropriately keeps content brief for this simple option, provides a clear usage example, and shows sample output format. Structure is consistent with other utility option documentation.docs/what_is_the_difference_between_v1_and_v2.md (2)
1-1: Verify related-cli-options metadata usage.The HTML comment
<!-- related-cli-options: ... -->appears to be a new pattern for cross-reference support. Confirm this is supported by the documentation build system (scripts/build_cli_docs.py or similar).
192-202: LGTM on decision tree diagram.The Mermaid flowchart provides excellent guidance for users selecting an output model type. The decision logic is clear and covers all major use cases well.
docs/index.md (2)
149-151: Verify code block formatting style.The linter flags line 149 as having an incorrect code block style (indented vs. fenced). The block appears correctly formatted as a fenced code block. If this is showing as an issue, verify the markdown parsing is correct for your toolchain. If intentional indentation is needed within a list context, this may be expected.
145-162: LGTM on new CI/CD and one-liner documentation sections.The addition of
--checkexample with disable-timestamp and the new cross-references to ci-cd.md and oneliner.md guide users effectively toward important use cases. Navigation improvements are excellent.tests/cli_doc/test_cli_options_sync.py (1)
79-97: MANUAL_DOCS coverage logic looks correctThe new
MANUAL_DOCSusage (manual = MANUAL_DOCS,covered = documented | manual) and the failure message for missing options are coherent and match the intended “documented or manually documented” invariant. No changes needed here.README.md (1)
27-32: Nice navigation upgrades for CI/CD and one‑linersThe added CI/CD and one‑liner links, plus the
--checkquick recipe and pointer to the CI/CD doc, make the main README much more discoverable. No issues from a docs or accuracy standpoint.Also applies to: 187-193
docs/cli-reference/manual/profile.md (1)
1-43:--profilemanual doc is clear and consistentThe description, pyproject.toml example, and usage snippets accurately reflect how
--profileworks with[tool.datamodel-codegen.profiles.<name>]. No changes needed.docs/cli-reference/general-options.md (2)
1164-1171: Good CI/CD cross‑link for--checkThe new “See also: CI/CD Integration” link is well placed and accurately highlights CI use of
--check. Looks good.
1674-1681: Cross‑links for model reuse and output types are helpfulThe new “See also” references to Model Reuse/Deduplication and Output Model Types nicely surface deeper docs from these general options. No issues.
Also applies to: 4009-4012
docs/oneliner.md (1)
1-205: Comprehensive and accurate one‑liner usage guideThe uvx/pipx, stdin, clipboard, and API examples are well put together and match the actual CLI behavior. This page will be very useful for quick, non‑installed workflows.
docs/cli-reference/manual/help.md (1)
1-28:--helpmanual documentation matches CLI behaviorThe description, alias list, usage example, and sample output align with the current
datamodel-codegen --help. No changes needed.docs/cli-reference/model-customization.md (2)
1203-1212: Good cross‑link from--collapse-root-modelsto model reuseThe added “See also: Model Reuse and Deduplication” is a sensible cross‑reference for this option and should help readers discover the reuse docs. Looks good.
1361-1362: Output‑model and CI/CD “See also” links are well chosenThe new “See also: Output Model Types” and “See also: Model Reuse and Deduplication / CI/CD Integration” lines around
--dataclass-arguments,--frozen-dataclasses,--keyword-only,--output-model-type,--reuse-model,--reuse-scope, and--target-python-versionare accurate and improve navigability without duplicating content.Also applies to: 2386-2387, 2633-2634, 2965-2966, 3208-3211, 3321-3324, 4011-4012
docs/cli-reference/quick-reference.md (1)
148-157: Utility options section and index entries look correctThe new Utility Options category and the added alphabetical entries for
--debug,--help,--no-color,--profile, and--versionall point to the right anchors and describe the options consistently with the CLI help. No changes needed.Also applies to: 182-183, 203-204, 214-215, 222-223, 265-265
tests/conftest.py (2)
42-46: LGTM! New aliases parameter properly integrated.The
aliasesparameter addition to thecli_docmarker declaration is well-documented and follows the existing parameter pattern. The docstring clearly explains its purpose for alternative option names.
133-139: LGTM! Comprehensive validation for aliases parameter.The validation logic correctly:
- Allows
Nonevalues (aliases are optional)- Enforces list type when aliases are provided
- Validates all items are strings
This follows the same validation pattern as other list parameters like
related_options.mkdocs.yaml (1)
71-94: LGTM! Improved navigation structure enhances discoverability.The reorganization of the Usage section into logical groups (Input Formats, Output Customization, Templates and Formatting, Integration) significantly improves documentation navigation. The new "Utility Options" entry is appropriately placed in the CLI Reference section.
docs/cli-reference/index.md (1)
18-18: LGTM! Utility Options category properly integrated into CLI reference index.All utility option links correctly point to the new
utility-options.mdpage with appropriate anchors. The category table entry is consistent with other categories.Also applies to: 54-54, 87-87, 107-108, 121-121, 179-179
docs/cli-reference/utility-options.md (1)
1-164: LGTM! Comprehensive utility options documentation.The new utility options documentation is thorough and well-structured:
- Clear descriptions for each option
- Practical usage examples with annotations
- Helpful notes about requirements (e.g., debug extra, NO_COLOR env var)
- Related configuration examples (pyproject.toml profiles)
The documentation format is consistent with other CLI reference pages and follows Material for MkDocs conventions effectively.
docs/ci-cd.md (1)
1-292: LGTM! Excellent CI/CD integration documentation.This comprehensive guide covers all major CI/CD scenarios:
- Clear explanation of
--checkflag behavior with exit codes- Best practice recommendation for pyproject.toml configuration
- Examples for GitHub Actions, pre-commit hooks, GitLab CI, and Makefiles
- Multi-profile usage patterns
- Practical troubleshooting section
The examples are production-ready and the advice to use
disable-timestamp = trueand pin Python versions is valuable for reproducible builds.tests/main/jsonschema/test_main_jsonschema.py (3)
1774-1789: LGTM! Well-documented specialized enum test.The new test properly documents
--use-specialized-enumwith:
- Clear cli_doc marker with related options
- Descriptive docstring explaining StrEnum/IntEnum generation
- Appropriate test implementation for Python 3.11+ targets
1804-1824: LGTM! Complementary test for disabling specialized enums.The test for
--no-use-specialized-enumcorrectly:
- Documents the disable path with cli_doc marker
- Explains the flag generates standard Enum instead of specialized types
- Mirrors the positive test structure
897-897: LGTM! Aliases feature properly demonstrated.The
aliases=["--capitalise-enum-members"]entry demonstrates the new aliasing feature for UK/US spelling variants of the option. This is a good example of the aliases parameter usage.src/datamodel_code_generator/cli_options.py (3)
45-56: LGTM! Clear rename with backward compatibility.The rename from
EXCLUDED_FROM_DOCStoMANUAL_DOCSbetter reflects the purpose (options with hand-written documentation). The backward compatibility alias ensures existing code continues to work.
156-156: LGTM! New option properly registered.The
--use-specialized-enumoption is correctly added toCLI_OPTION_METAwith the appropriate TYPING category.
265-277: LGTM! Well-designed API evolution.The new
is_manual_doc()function has a clearer name than the oldis_excluded_from_docs(). The backward compatibility wrapper with deprecation note in the docstring provides a smooth migration path.tests/cli_doc/test_cli_doc_coverage.py (1)
21-21: LGTM! Test coverage updated for MANUAL_DOCS.All references to the renamed symbol are updated consistently:
- Import changed to
MANUAL_DOCS- Test method renamed for clarity (
test_documented_options_not_manual)- Failure messages updated to reference
MANUAL_DOCS- Documentation calculation uses new symbol name
Also applies to: 82-89, 107-107
scripts/build_cli_docs.py (9)
34-54: LGTM!The imports and constants are well-defined. The regex pattern correctly captures CLI options from HTML comment tags in the format
<!-- related-cli-options: --option1, --option2 -->.
68-112: LGTM!The function correctly scans markdown files for CLI option tags, properly excludes auto-generated content, and normalizes option names to their canonical forms.
237-239: LGTM!Good defensive coding practice to use
.get()for safe dictionary access, consistent with other kwargs access patterns in the function.
260-264: LGTM!The "See also" section correctly generates cross-references to related manual documentation pages with proper relative paths.
401-405: LGTM!The parameter is correctly threaded through the function hierarchy to enable cross-linking in option sections.
Also applies to: 422-422
516-577: LGTM!The index page correctly integrates manual documentation options with proper linking and categorization.
580-594: LGTM!The function correctly reads and validates manual documentation files, ensuring only recognized manual options are loaded.
597-628: LGTM!The function correctly generates a comprehensive utility options page with table of contents and individual sections for each manual option.
663-664: LGTM!The manual documentation integration is correctly implemented with proper fallback behavior when manual docs are absent, consistent error handling, and accurate option counting.
Also applies to: 728-750
… into docs/comprehensive-improvements
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/main/graphql/test_main_graphql.py (1)
540-577: Fix critical flag mismatch: Replace--frozenwith--frozen-dataclassesin test execution.The decorator specifies
--frozen-dataclassesin bothcli_args(line 546) andrelated_options(line 552), but the actual test execution uses--frozen(line 572). The only valid flag is--frozen-dataclasses.Update the test execution args and docstring:
extra_args=[ "--output-model-type", "dataclasses.dataclass", - "--frozen", + "--frozen-dataclasses", "--keyword-only", "--target-python-version", "3.10",Also update the docstring to match:
"""Generate dataclasses with keyword-only fields (Python 3.10+). The `--keyword-only` flag generates dataclasses where all fields must be specified as keyword arguments (kw_only=True). This is only available for - Python 3.10+. When combined with `--frozen`, it creates immutable dataclasses + Python 3.10+. When combined with `--frozen-dataclasses`, it creates immutable dataclasses with keyword-only arguments, improving code clarity and preventing positional argument errors. """
♻️ Duplicate comments (4)
docs/cli-reference/model-customization.md (1)
1359-1367: Align--frozenvs--frozen-dataclassesnaming in dataclass sectionsThe docs still mix
--frozenand--frozen-dataclasses:
- Line 1359:
**Related:** \--frozen`, ...`- Line 2631 and the usage example at 2638: refer to
--frozen.But the options table at the top exposes
--frozen-dataclasses, and the dedicated section header is## \--frozen-dataclasses`. Unless--frozen` is a deliberate, documented alias, this is likely confusing.Consider updating these references and the example command to use
--frozen-dataclassesfor consistency with the rest of the CLI docs (or explicitly mention that--frozenis an alias, if that’s the case).Also applies to: 2627-2639
scripts/build_cli_docs.py (3)
231-231: Remove unusednoqadirective.The
noqadirective references Pylint codes (PLR0912, PLR0914, PLR0915) that are not enabled in your Ruff configuration.🔎 Apply this diff:
-def generate_option_section( # noqa: PLR0912, PLR0914, PLR0915 +def generate_option_section( option: str, primary: dict[str, Any], option_related_pages: dict[str, list[tuple[str, str]]] | None = None, ) -> str:
436-436: Remove unusednoqadirective.The
noqadirective references Pylint codes (PLR0912, PLR0915) that are not enabled in your Ruff configuration.🔎 Apply this diff:
-def generate_quick_reference( # noqa: PLR0912, PLR0915 +def generate_quick_reference( categories: dict[OptionCategory, dict[str, Any]], manual_docs: dict[str, str] | None = None, ) -> str:
718-718: Remove unusednoqadirective.The
noqa: T201directive is not needed as the Ruff rule is not enabled in your configuration.🔎 Apply this diff:
- print(f"Error generating {category.value}: {e}", file=sys.stderr) # noqa: T201 + print(f"Error generating {category.value}: {e}", file=sys.stderr) errors += 1
🧹 Nitpick comments (1)
docs/cli-reference/general-options.md (1)
32-33: General-option cross-links look good; minor wording tweak for pyproject docsThe new “See also” links (module exports, CI/CD, model reuse, pyproject configuration) use correct relative paths and are well-matched to each option’s purpose.
One small polish suggestion: the link text “pyprojecttoml Configuration” reads a bit odd. Consider changing it to “pyproject.toml Configuration” while keeping the same target
../pyproject_toml.mdfor clarity and consistency with the rest of the docs.Also applies to: 604-605, 1174-1175, 1248-1249, 1368-1370, 1402-1404, 1610-1612, 1684-1686
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
docs/cli-reference/general-options.md(8 hunks)docs/cli-reference/model-customization.md(8 hunks)docs/cli-reference/openapi-only-options.md(5 hunks)docs/cli-reference/template-customization.md(7 hunks)docs/cli-reference/typing-customization.md(10 hunks)docs/module-exports.md(1 hunks)docs/openapi-options.md(1 hunks)docs/python-version-compatibility.md(1 hunks)docs/type-mappings.md(1 hunks)mkdocs.yaml(1 hunks)scripts/build_cli_docs.py(13 hunks)src/datamodel_code_generator/cli_options.py(2 hunks)tests/cli_doc/test_cli_doc_coverage.py(3 hunks)tests/conftest.py(2 hunks)tests/main/graphql/test_main_graphql.py(2 hunks)
✅ Files skipped from review due to trivial changes (2)
- docs/openapi-options.md
- docs/python-version-compatibility.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/cli-reference/template-customization.md
🧰 Additional context used
🧬 Code graph analysis (2)
tests/cli_doc/test_cli_doc_coverage.py (1)
src/datamodel_code_generator/cli_options.py (1)
get_all_canonical_options(259-261)
scripts/build_cli_docs.py (1)
src/datamodel_code_generator/cli_options.py (3)
OptionCategory(18-27)get_canonical_option(244-255)is_manual_doc(264-267)
🪛 LanguageTool
docs/cli-reference/openapi-only-options.md
[style] ~938-~938: Using many exclamation marks might seem excessive (in this case: 15 exclamation marks for a text that’s 3759 characters long)
Context: ... Constraints](../field-constraints.md) !!! tip "Usage" ```bash datamodel-...
(EN_EXCESSIVE_EXCLAMATION)
docs/cli-reference/general-options.md
[style] ~1685-~1685: Using many exclamation marks might seem excessive (in this case: 33 exclamation marks for a text that’s 7660 characters long)
Context: ... and Deduplication](../model-reuse.md) !!! tip "Usage" ```bash datamodel-...
(EN_EXCESSIVE_EXCLAMATION)
🪛 markdownlint-cli2 (0.18.1)
docs/module-exports.md
81-81: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
151-151: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/cli-reference/general-options.md
32-32: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
32-32: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
604-604: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
604-604: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1174-1174: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1174-1174: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1248-1248: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1248-1248: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1368-1368: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1368-1368: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1402-1402: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1402-1402: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1610-1610: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1610-1610: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1684-1684: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1684-1684: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
docs/cli-reference/typing-customization.md
605-605: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
605-605: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
887-887: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
887-887: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
950-950: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
950-950: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1063-1063: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1063-1063: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1128-1128: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1128-1128: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1199-1199: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1199-1199: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1273-1273: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1273-1273: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1566-1566: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1566-1566: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1638-1638: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1638-1638: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1949-1949: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
1949-1949: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
🪛 Ruff (0.14.8)
tests/cli_doc/test_cli_doc_coverage.py
82-82: Unused noqa directive (non-enabled: PLR6301)
Remove unused noqa directive
(RUF100)
104-104: Unused noqa directive (non-enabled: PLR6301)
Remove unused noqa directive
(RUF100)
scripts/build_cli_docs.py
231-231: Unused noqa directive (non-enabled: PLR0912, PLR0914, PLR0915)
Remove unused noqa directive
(RUF100)
436-436: Unused noqa directive (non-enabled: PLR0912, PLR0915)
Remove unused noqa directive
(RUF100)
718-718: Unused noqa directive (non-enabled: T201)
Remove unused noqa directive
(RUF100)
tests/conftest.py
50-50: Unused noqa directive (non-enabled: PLR0912, PLR0914)
Remove unused noqa directive
(RUF100)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: benchmarks
- GitHub Check: 3.11 on macOS
🔇 Additional comments (14)
tests/main/graphql/test_main_graphql.py (1)
477-509: LGTM: Metadata correctly updated to reference--frozen-dataclasses.The
related_optionsupdate at line 487 properly reflects the renamed CLI flag for documentation cross-referencing purposes. Since this test doesn't use the frozen flag in its execution, the change is purely metadata and appears correct.docs/cli-reference/openapi-only-options.md (1)
24-25: Cross-links to OpenAPI options look correctAll added “See also: OpenAPI-Specific Options” references use the right relative path (
../openapi-options.md) and are consistently placed after the option descriptions. No issues from a docs/structure perspective.Also applies to: 116-117, 577-578, 655-656, 937-938
docs/cli-reference/typing-customization.md (1)
605-606: Typing customization cross-links are consistent and well-targetedThe added “See also” links all point to the right companion docs (
../python-version-compatibility.mdand../type-mappings.md) and are attached to options where that extra context is actually useful (--output-datetime-class,--strict-types,--type-mappings, container-type switches, pendulum usage, union/Annotated options). No structural or correctness issues spotted.Also applies to: 887-888, 950-951, 1063-1064, 1128-1129, 1199-1200, 1273-1274, 1566-1567, 1638-1639, 1949-1950
docs/cli-reference/model-customization.md (1)
1211-1212: Model-customization See also links are well-alignedAll the added “See also” references here (to model reuse, output model types, Python version compatibility, CI/CD) are correctly linked and attached to the right options (
--collapse-root-models,--frozen-dataclasses,--keyword-only,--output-model-type,--reuse-model,--reuse-scope,--target-python-version). From a navigation and structure standpoint this looks solid.Also applies to: 2386-2387, 2633-2634, 2965-2966, 3210-3211, 3323-3324, 4011-4012
mkdocs.yaml (1)
71-98: LGTM! Excellent navigation improvements.The reorganization into logical groups (Input Formats, Output Customization, Templates and Formatting, Integration) significantly improves discoverability and user experience. The addition of the Utility Options section complements the new manual docs support.
tests/cli_doc/test_cli_doc_coverage.py (1)
21-89: LGTM! Consistent rename to MANUAL_DOCS.The rename from
EXCLUDED_FROM_DOCStoMANUAL_DOCSimproves clarity—these options have manual documentation rather than being "excluded." The backward-compatibility alias incli_options.pyensures no breaking changes.src/datamodel_code_generator/cli_options.py (2)
45-56: LGTM! Clean backward-compatible rename.The rename from
EXCLUDED_FROM_DOCStoMANUAL_DOCSbetter conveys intent—these options have hand-written documentation. The backward-compatibility alias ensures existing code continues to work.
264-276: LGTM! Proper backward-compatible helper functions.The new
is_manual_doc()function with its backward-compatible wrapperis_excluded_from_docs()maintains API compatibility while improving naming clarity. Both correctly canonicalize options before checking.tests/conftest.py (1)
42-46: LGTM! Clean addition of aliases parameter.The new
aliasesparameter for thecli_docmarker is well-integrated, with proper validation that ensures it's a list of strings when provided. The validation logic is consistent with existing parameter checks.Also applies to: 133-139
scripts/build_cli_docs.py (5)
34-38: LGTM! Clean integration of manual docs support.The imports and constants properly establish the infrastructure for manual documentation. The
MANUAL_OPTION_DESCRIPTIONSdict provides user-friendly descriptions for utility options.Also applies to: 67-74
77-121: LGTM! Well-implemented cross-reference scanning.The
scan_docs_for_cli_option_tags()function effectively extracts CLI option references from markdown files to enable "See also" links. The logic correctly:
- Skips auto-generated cli-reference docs
- Extracts page titles from H1 headings
- Canonicalizes option names
- Returns relative paths from docs/ root
231-274: LGTM! Enhanced option section with cross-linking.The updated
generate_option_section()now includes:
- Aliases support (lines 246-248)
- Cross-references to related manual pages (lines 269-273)
The "See also" links improve documentation discoverability.
581-621: LGTM! Clean manual docs loading and rendering.The
read_manual_docs()andgenerate_manual_docs_section()functions properly:
- Load manual markdown files from the manual/ directory
- Filter by MANUAL_DOCS set
- Generate a consistent utility options page
- Handle empty cases gracefully
656-683: LGTM! Comprehensive manual docs integration in build flow.The
build_docs()function now:
- Loads manual docs via
read_manual_docs()- Scans for CLI option cross-references
- Passes manual docs to all generation functions
- Generates the utility-options.md page
- Adjusts option counts to include manual docs
The integration maintains backward compatibility when manual docs are absent.
Also applies to: 721-743
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2681 +/- ##
=======================================
Coverage 99.52% 99.52%
=======================================
Files 79 79
Lines 11172 11174 +2
Branches 1348 1348
=======================================
+ Hits 11119 11121 +2
Misses 32 32
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… into docs/comprehensive-improvements
for more information, see https://pre-commit.ci
🤖 Generated by GitHub Actions
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
pyproject.toml (2)
174-181: Consider refactoring complex scripts.The complexity rule ignores (PLR0912, PLR0914, PLR0915) suggest that scripts in
scripts/*.pymay have high complexity. While acceptable for build scripts, consider refactoring complex scripts into smaller functions or modules to improve maintainability.
174-181: Consider narrowing the blanket "S" security ignore for scripts to specific rules where necessary.The scripts in
scripts/*.pyusesubprocess.run()with an argument list (notshell=True) and perform standard file I/O—both secure patterns. Ignoring all Bandit security rules is unnecessarily broad. Ignoring rules indiscriminately diminishes the value of the linter, and you should only ignore rules that are truly necessary. Instead, whitelist only the specific rules that genuinely conflict with build script requirements (e.g., S101 for assert usage if tests are run), allowing legitimate security checks to remain active.scripts/build_cli_docs.py (1)
650-652: Consider logging a warning on schema version mismatch.The version check currently does nothing when
schema_version != 1. Adding a warning would aid debugging if the schema format changes.🔎 Suggested improvement:
schema_version = collection.get("schema_version", 0) if schema_version != 1: - pass + print(f"Warning: Unexpected schema version {schema_version}, expected 1", file=sys.stderr)
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pyproject.toml(1 hunks)scripts/build_cli_docs.py(14 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
scripts/build_cli_docs.py (1)
src/datamodel_code_generator/cli_options.py (4)
OptionCategory(18-27)get_canonical_option(244-255)get_option_meta(279-291)is_manual_doc(264-267)
🪛 Ruff (0.14.8)
scripts/build_cli_docs.py
626-626: subprocess call: check for execution of untrusted input
(S603)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: 3.9 on Windows
- GitHub Check: 3.12 on Windows
- GitHub Check: 3.13 on Windows
- GitHub Check: 3.11 on Windows
- GitHub Check: 3.11 on macOS
- GitHub Check: 3.12 on macOS
- GitHub Check: 3.10 on Windows
- GitHub Check: 3.10 on macOS
- GitHub Check: 3.13 on macOS
- GitHub Check: benchmarks
🔇 Additional comments (7)
scripts/build_cli_docs.py (7)
52-74: LGTM!The
CLI_OPTIONS_TAG_PATTERNregex correctly captures CLI options from markdown comments, andMANUAL_OPTION_DESCRIPTIONSis properly extracted as a module-level constant (addressing the previous review feedback).
77-121: Well-structured function for cross-referencing CLI options.The approach using
relative_to()for path exclusion is valid. The function correctly maps CLI options to documentation pages that reference them via the HTML comment tags.
269-273: Cross-linking implementation looks correct.The relative path construction
../{page_path}correctly navigates fromdocs/cli-reference/*.mdto other documentation pages, sincepage_pathis relative todocs/.
581-595: LGTM!The function correctly filters manual documentation files against the
MANUAL_DOCSset from cli_options, ensuring only registered manual options are included.
598-621: Clean implementation of the utility options page generator.The function correctly handles empty input, generates a structured table of contents, and properly concatenates manual documentation content with separators.
624-635: LGTM!The static analysis warning (S603) about untrusted subprocess input is a false positive here—all arguments are hardcoded strings and
sys.executable, with no user-controlled input.
682-739: Well-integrated manual documentation support.The integration correctly:
- Scans for CLI option tags and passes them to category page generation
- Includes manual docs in index and quick reference pages
- Accurately calculates total option count including manual docs
…LI documentation generation
…ax in documentation
🤖 Generated by GitHub Actions
🤖 Generated by GitHub Actions
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
tests/cli_doc/test_cli_options_sync.py (1)
47-47: Remove unused# noqa: PLR6301directives.These
# noqa: PLR6301markers are flagged as unused by Ruff (RUF100) sincePLR6301is not enabled in the linter configuration.Also applies to: 59-59
🧹 Nitpick comments (1)
docs/model-reuse.md (1)
214-214: Consider replacing the over-used intensifier "very."The phrase "very large schemas" (line 214) uses an intensifier that could be strengthened. Consider alternatives such as "extremely large schemas," "massive schemas," or simply removing the modifier if context is sufficient.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.coderabbit.yaml(1 hunks)docs/model-reuse.md(1 hunks)tests/cli_doc/test_cli_options_sync.py(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/cli_doc/test_cli_options_sync.py (1)
src/datamodel_code_generator/cli_options.py (1)
get_all_canonical_options(259-261)
🪛 LanguageTool
docs/model-reuse.md
[style] ~214-~214: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...on | !!! tip "Performance tip" For very large schemas, combine --reuse-model with `...
(EN_WEAK_ADJECTIVE)
🪛 markdownlint-cli2 (0.18.1)
docs/model-reuse.md
216-216: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
🪛 Ruff (0.14.8)
tests/cli_doc/test_cli_options_sync.py
47-47: Unused noqa directive (non-enabled: PLR6301)
Remove unused noqa directive
(RUF100)
59-59: Unused noqa directive (non-enabled: PLR6301)
Remove unused noqa directive
(RUF100)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
- GitHub Check: py312-pydantic1 on Ubuntu
- GitHub Check: py312-isort6 on Ubuntu
- GitHub Check: py312-isort5 on Ubuntu
- GitHub Check: 3.11 on Windows
- GitHub Check: 3.10 on macOS
- GitHub Check: 3.11 on macOS
- GitHub Check: 3.10 on Windows
- GitHub Check: py312-black24 on Ubuntu
- GitHub Check: 3.12 on Windows
- GitHub Check: 3.11 on Ubuntu
- GitHub Check: 3.9 on Windows
- GitHub Check: 3.14 on macOS
- GitHub Check: 3.9 on macOS
- GitHub Check: 3.9 on Ubuntu
- GitHub Check: 3.13 on macOS
- GitHub Check: 3.13 on Windows
- GitHub Check: 3.14 on Windows
- GitHub Check: 3.14 on Ubuntu
- GitHub Check: benchmarks
🔇 Additional comments (6)
tests/cli_doc/test_cli_options_sync.py (1)
1-97: LGTM! Semantic improvements through consistent renaming.The renaming from
EXCLUDED_FROM_DOCStoMANUAL_DOCSimproves clarity about the purpose of these options. All references have been consistently updated across docstrings, test method names, variable references, and error messages while preserving the test logic..coderabbit.yaml (1)
1-1: LGTM! Schema reference is correctly configured.The YAML language server directive properly references the CodeRabbit v2 schema, enabling IDE validation and autocomplete for this configuration file.
docs/model-reuse.md (4)
213-218: Verify code block formatting within MkDocs admonitions.The static analysis tool flagged line 216 as using an indented code block when a fenced code block is expected. However, within MkDocs admonition blocks (
!!! tip), indented code formatting is typically required. Please verify the rendered output displays the code block correctly in the final documentation.
3-251: Excellent documentation structure and comprehensive coverage.The file provides clear, well-organized documentation with:
- Quick reference table (lines 9–15) for immediate understanding
- Detailed sections with before/after comparisons
- Real-world multi-file and single-file use cases
- Practical performance considerations
- Helpful "Combining Options" guidance for different project scales
The examples are clear and the output structure comparisons (lines 222–242) effectively illustrate the benefits of deduplication.
246-251: All cross-referenced documentation paths and sections are valid. The files exist at the specified locations (cli-reference/model-customization.mdandroot-model-and-type-alias.md), and all anchor links (#reuse-model,#reuse-scope,#collapse-root-models) are properly defined in the documentation.
1-1: No action required. The<!-- related-cli-options: ... -->metadata tag format is already consistently applied across the documentation (13+ files), and this file adheres to the established pattern.Likely an incorrect or invalid review comment.
Summary
Summary by CodeRabbit
Documentation
User-facing CLI
✏️ Tip: You can customize this high-level summary in your review settings.