Skip to content

Conversation

@dacharyc
Copy link
Collaborator

@dacharyc dacharyc commented Jan 7, 2026

Summary

Adds report testable-code command to analyze code examples on documentation pages from analytics data. This helps identify high-traffic pages with testable but untested code examples.

New Command

# Analyze pages from analytics CSV
./audit-cli report testable-code analytics.csv [monorepo-path]

# Output formats: text (default), json, csv
./audit-cli report testable-code analytics.csv --format json --output report.json

Features:

  • Resolves URLs to source files via Snooty Data API (with 24-hour caching)
  • Collects code examples (literalinclude, code-block, io-code-block)
  • Determines product context from tabs, composables, and content directories
  • Reports tested vs testable vs "maybe testable" examples

Refactoring

Extracted shared utilities to internal packages for reuse:

  • internal/language - Language normalization and product mapping
  • internal/snooty - Snooty.toml parsing
  • internal/config/url_mapping.go - URL-to-source-file resolution
  • internal/projectinfo/products.go - Content directory to product mapping
  • internal/rst/yaml_steps_parser.go - YAML steps file parsing

Version

Bumps version to 0.3.0

@dacharyc dacharyc merged commit 56a9c26 into main Jan 13, 2026
2 checks passed
@dacharyc dacharyc deleted the DOCSP-56681 branch January 13, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants