fix(docs): remove obsolete CLI reference pages after generation
Metadata
Current evaluation
Merged a fix that automatically removes obsolete CLI documentation files after regeneration, preventing build errors. Approved by reviewers, passed CI checks, and closed the related issue.
Suggested action: —
No scores available.
Issue body
- [x] I have followed the [contributing guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md).
- [x] I have signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I have successfully run `make lint`.
- [x] I have successfully run `make test`.
This PR fixes an issue where obsolete CLI documentation files (`.rst`) under `docs/reference/commands/` were not removed after regeneration.
Obsolete command pages could persist after a build, causing errors such as:
document isn't included in any toctree
This change ensures old `.rst` files are deleted if their corresponding commands are no longer present.
Closes #5200
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix that automatically removes obsolete CLI documentation files after regeneration, preventing build errors. Approved by reviewers, passed CI checks, and closed the related issue. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to close issue #5200. The change deletes obsolete CLI reference pages after generation to prevent toctree errors. The contributor updated setup instructions per reviewer feedback, passed lint and tests, and the fix was integrated. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix to delete obsolete .rst CLI reference pages during generation, resolving toctree errors when commands are removed. Contributor adjusted build steps per feedback, passed tests, and the change was merged, closing issue #5200. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #318 docs: automate CLI reference documentation | rockcraft | merged | Merged automated CLI reference documentation generation. Approved by three reviewers, passed CI checks, and updated five files. Implements CRAFT-1779 to streamline documentation updates. | |
| #477 build(docs): make `clean` target scrub `docs/reference/gen` | starbase | merged | Merged upstreamed changes to update the build clean target, ensuring it removes the generated docs/reference/gen directory. Approved by two reviewers and passed all CI checks. | |
| #513 build(docs): fix double build with docs-lint | starbase | merged | Merged a one-line fix resolving a double build issue during docs-lint by correcting a mistaken assumption about Sphinx's linter requirements. Approved by two reviewers, passed CI, and closed issue #512. | |
| #1030 docs: fix some URL issues in docs and CLI messages | rockcraft | merged | Merged following approval from two reviewers and successful CI checks. Corrected broken or outdated URLs across documentation and CLI messages in 11 files. A related schema validation issue was addressed separately in PR #1029. | |
| #1423 build(docs): make `clean` target scrub `reference/gen` | craft-parts | merged | Merged. Updated the build clean target to explicitly scrub docs/reference/gen instead of relying on implicit Git ignores. Approved by three reviewers and passed CI checks, including all test suites and linting. | |
| #1250 Fixed links to doc | snapcraft | merged | Merged a minor fix removing obsolete documentation links from the README after the doc folder was deleted. Approved by a reviewer, passed CI, and rebased to confirm CLA status. | |
| #2787 docs: fix versioning logic | charmcraft | merged | Merged. Fixes branch-based documentation build versioning logic by correcting version name generation. Passed all CI checks and received reviewer approval. | |
| #453 build(docs): remove line length check from linter | starbase | merged | Merged a change removing the line length check from the documentation linter. Approved by two reviewers, passed all CI checks, and updated a single line. | |
| #5526 fix(docs): Fix missing code block | snapcraft | merged | Merged an external contributor's fix adding a missing code block to the architecture-independent documentation. Approved by two reviewers, passed CI, and integrated. | |
| #419 docs: update / remove duplicate content | rockcraft | merged | Merged to update and remove duplicate documentation, fixing issue #405. Approved by two reviewers despite ReadTheDocs build warnings about undefined labels. Reduced 57 lines across 5 files. |