Add analyze orphaned-files command #91
Closed
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
This PR adds a new
analyze orphaned-filescommand that identifies files with no incoming references from other files in the documentation.What's New
The
analyze orphaned-filescommand scans all RST and YAML files in a source directory to build a complete reference map, then identifies files that have zero incoming references.Key Features
--include-toctree: Consider navigation links when determining orphaned status--exclude <pattern>: Exclude paths matching glob patterns (e.g.,*/archive/*)--verbose: Show detailed scanning progress--format json: Machine-readable output for automationUse Cases
This command helps documentation writers:
Examples
Testing
Files Changed
New Files
audit-cli/commands/analyze/orphaned-files/orphaned_files.go- Main command implementationaudit-cli/commands/analyze/orphaned-files/analyzer.go- Core analysis logicaudit-cli/commands/analyze/orphaned-files/output.go- Output formattingaudit-cli/commands/analyze/orphaned-files/types.go- Data structuresaudit-cli/commands/analyze/orphaned-files/orphaned_files_test.go- TestsModified Files
audit-cli/commands/analyze/analyze.go- Registered new subcommandaudit-cli/README.md- Added comprehensive documentationPull Request opened by Augment Code with guidance from the PR author