Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Commit fb44486

Browse files
committed
Add docs-platform to default exclusions
1 parent 9a84133 commit fb44486

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

audit-cli/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,7 @@ The command automatically excludes:
754754
- Files in `code-examples` directories at the root of `content` or `source` (these contain plain text examples, not pages)
755755
- Files in the following directories at the root of `content`:
756756
- `404` - Error pages
757+
- `docs-platform` - Documentation for the MongoDB website and meta content
757758
- `meta` - MongoDB Meta Documentation - style guide, tools, etc.
758759
- `table-of-contents` - Navigation files
759760
- All non-`.txt` files (configuration files, YAML, etc.)

audit-cli/commands/count/pages/counter.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ func CountPages(dirPath string, forProject string, excludeDirs []string, current
5050

5151
// Default exclusions at the root of content or source
5252
defaultExclusions := map[string]bool{
53-
"404": true,
54-
"meta": true,
53+
"404": true,
54+
"docs-platform": true,
55+
"meta": true,
5556
"table-of-contents": true,
5657
}
5758

@@ -208,6 +209,7 @@ func extractProjectName(relPath string) string {
208209
// Parameters:
209210
// - relPath: Relative path from content directory
210211
// - projectName: Name of the project (first directory component)
212+
//
211213
// Returns the version name, or empty string if non-versioned
212214
func extractVersionFromPath(relPath string, projectName string) string {
213215
parts := strings.Split(relPath, string(filepath.Separator))
@@ -318,4 +320,3 @@ func getCurrentVersion(projectDir string) (string, error) {
318320

319321
return "", fmt.Errorf("no current version found in project directory: %s", projectDir)
320322
}
321-

audit-cli/commands/count/pages/pages.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import (
1313
// This command counts documentation pages (.txt files) in the MongoDB documentation monorepo.
1414
//
1515
// Usage:
16-
// count pages /path/to/docs-monorepo
17-
// count pages /path/to/docs-monorepo --for-project manual
18-
// count pages /path/to/docs-monorepo --count-by-project
19-
// count pages /path/to/docs-monorepo --exclude-dirs api-reference,generated
16+
//
17+
// count pages /path/to/docs-monorepo
18+
// count pages /path/to/docs-monorepo --for-project manual
19+
// count pages /path/to/docs-monorepo --count-by-project
20+
// count pages /path/to/docs-monorepo --exclude-dirs api-reference,generated
2021
//
2122
// Flags:
2223
// - --for-project: Only count pages for a specific project
@@ -43,6 +44,7 @@ Automatic exclusions:
4344
- Files in code-examples directories (at root of content or source)
4445
- Files in the following directories at the root of content:
4546
- 404
47+
- docs-platform
4648
- meta
4749
- table-of-contents
4850
- All non-.txt files
@@ -124,4 +126,3 @@ func runPages(dirPath string, forProject string, countByProject bool, excludeDir
124126

125127
return nil
126128
}
127-

0 commit comments

Comments
 (0)