Documentation
¶
Overview ¶
@index Consumer-owned graph read contracts for generated documentation and lint policy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contradiction ¶
Contradiction represents a symbol whose annotation is outdated relative to the code: the node was modified after the annotation was last written, and the annotation contains detail tags (e.g. @param) that may no longer be accurate. @intent 코드 변경으로 세부 어노테이션 신뢰성이 깨진 심볼을 보고한다.
type DeadRef ¶
type DeadRef struct {
QualifiedName string // the symbol that contains the @see tag
SeeTarget string // the @see value that could not be resolved
}
DeadRef represents an @see tag whose target qualified name does not exist in the graph. This indicates a broken cross-reference that should be updated or removed. @intent 해석되지 않는 @see 참조를 수집해 문서 링크 정합성을 점검한다.
type Generator ¶
type Generator struct {
Repository Repository
Files RootedFiles
OutDir string
Exclude []string // path/glob patterns to exclude (see pathspec.MatchExcludes)
Namespace string
Prune bool
}
Generator reads the SQLite graph and writes markdown documentation. @intent 그래프에 저장된 심볼과 어노테이션을 문서 생성 단계로 전달한다.
func (*Generator) Lint ¶
func (g *Generator) Lint() (*LintReport, error)
Lint checks the documentation directory against the code graph and returns a report of orphan, missing, and stale documentation files. @intent 문서 파일, 그래프 노드, 어노테이션을 교차 검증해 문서 건강 상태를 계산한다. @sideEffect 출력 디렉터리와 데이터베이스를 읽는다.
type LintReport ¶
type LintReport struct {
Orphans []string // doc files with no matching source in the graph
Missing []string // source files in the graph with no doc file
Stale []string // doc files older than the source's last update
Unannotated []string // qualified names of symbols with no annotation
Contradictions []Contradiction // annotated symbols whose code changed after the annotation
DeadRefs []DeadRef // @see targets that do not exist in the graph
Incomplete []string // annotated symbols with no @intent tag
Drifted []string // annotated symbols whose node was updated after the annotation
}
LintReport contains the results of a documentation lint check. @intent 문서 생성물과 어노테이션 품질 점검 결과를 카테고리별로 반환한다.
type Repository ¶
type Repository interface {
Snapshot(ctx context.Context, namespace string, kinds []graph.NodeKind) (Snapshot, error)
OutgoingDocEdges(ctx context.Context, namespace string, nodeIDs []uint) (map[uint][]graph.Edge, error)
QualifiedNameExists(ctx context.Context, namespace, qualifiedName string) (bool, error)
CCGRefExists(ctx context.Context, ref reference.Ref) (bool, error)
}
Repository supplies namespace-scoped facts required by docs generation and lint. @intent isolate generated-format and lint policy from GORM query construction.
type RootedFiles ¶
type RootedFiles interface {
Validate(relPath string) error
Read(relPath string) ([]byte, bool, error)
Write(relPath string, data []byte) error
Remove(relPath string) error
ModTime(relPath string) (time.Time, bool, error)
MarkdownFiles() (map[string]time.Time, error)
}
RootedFiles provides safe, atomic access relative to one configured docs output root. @intent keep path containment, symlink checks, and filesystem mutation outside docs policy.