Skip to content

feat(enrichment): public-API undocumented-export scan analyzer #2035

Description

@JSONbored

New REES github-light analyzer (the #1499 epic 'Public-API undocumented-export scan' idea) that flags exports newly added to a package's public entrypoint (main/exports/index) that ship with no adjacent doc comment — undocumented public surface. Fetches the changed entrypoint file at headSha to see the doc-block/signature pairing; conservative, fail-safe.

Deliverables

  • Add UndocumentedExportFinding ({ file, line, symbol: string }) + undocumentedExport? key to review-enrichment/src/types.ts
  • Create review-enrichment/src/analyzers/undocumented-export.ts: identify added exports in public-entrypoint files (from package.json main/exports or index.*), fetch the file at headSha (injected fetch) to check for a preceding JSDoc/docstring, flag those without; maxFiles + maxFindings caps
  • Register a descriptor (category 'quality', cost 'github-light', requires ['files','github-token','head-sha']) in review-enrichment/src/analyzers/registry.ts with inline render()
  • Add review-enrichment/test/undocumented-export.test.ts covering an undocumented public export flagged, a documented one not flagged, a non-entrypoint file skipped, and the token-absent skip

References

  • review-enrichment/src/analyzers/doc-comment-drift.ts (github-light fetch-file-at-headSha + doc/signature parse template)
  • review-enrichment/src/analyzers/registry.ts:373-392
  • gh issue 1499 lists 'Public-API undocumented-export scan' as a later idea

Part of #1499.


size: S · gittensor:feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions