WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
455 changes: 413 additions & 42 deletions audit-cli/README.md

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion audit-cli/commands/analyze/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
// This package serves as the parent command for various analysis operations.
// Currently supports:
// - includes: Analyze include directive relationships in RST files
// - file-references: Find all files that reference a target file
// - orphaned-files: Find files with no incoming references
//
// Future subcommands could include analyzing cross-references, broken links, or content metrics.
package analyze

import (
"github.com/mongodb/code-example-tooling/audit-cli/commands/analyze/includes"
filereferences "github.com/mongodb/code-example-tooling/audit-cli/commands/analyze/file-references"
orphanedfiles "github.com/mongodb/code-example-tooling/audit-cli/commands/analyze/orphaned-files"
"github.com/spf13/cobra"
)

Expand All @@ -22,12 +26,18 @@ func NewAnalyzeCommand() *cobra.Command {
Short: "Analyze reStructuredText file structures",
Long: `Analyze various aspects of reStructuredText files and their relationships.

Currently supports analyzing include directive relationships to understand file dependencies.
Currently supports:
- includes: Analyze include directive relationships (forward dependencies)
- file-references: Find all files that reference a target file (reverse dependencies)
- orphaned-files: Find files with no incoming references

Future subcommands may support analyzing cross-references, broken links, or content metrics.`,
}

// Add subcommands
cmd.AddCommand(includes.NewIncludesCommand())
cmd.AddCommand(filereferences.NewFileReferencesCommand())
cmd.AddCommand(orphanedfiles.NewOrphanedFilesCommand())

return cmd
}
Expand Down
Loading