/** * Universal Documentation Analyzer — Spec 17 R1 * * R1.1: Anonymous/inline callables are skipped entirely (not downgraded). * R1.2: Default scope is public API surface only. * R1.3: Minimum-size gate (docsMinLines, default 5). * R1.4: scope: "all" restores pre-spec-17 behaviour minus R1.1 skips. * R1.5: File-header checks default OFF (fileHeaders replaces requireFileDocs). * R1.6: Finding messages name the audience reason. * R7: All documentation/* severities are "suggestion". */ import { UniversalAnalyzer } from '../../languages/UniversalAnalyzer.js'; import type { Violation } from '../../types.js'; import type { AST, LanguageAdapter } from '../../languages/types.js'; /** * Configuration for documentation analyzer */ export interface DocumentationAnalyzerConfig { requireFunctionDocs: boolean; requireClassDocs: boolean; requireFileDocs: boolean; requireParamDocs: boolean; requireReturnDocs: boolean; minDescriptionLength: number; checkExportedOnly: boolean; exemptPatterns: string[]; scope?: 'public' | 'all'; docsMinLines?: number; fileHeaders?: boolean; headerSkipGlobs?: string[]; } export declare const DEFAULT_DOCUMENTATION_CONFIG: DocumentationAnalyzerConfig; export declare class UniversalDocumentationAnalyzer extends UniversalAnalyzer { readonly name = "documentation"; readonly description = "Analyzes documentation quality across the codebase"; readonly category = "documentation"; protected analyzeAST(ast: AST, adapter: LanguageAdapter, config: DocumentationAnalyzerConfig, sourceCode: string): Promise; /** * Returns true if the node is an anonymous arrow/function expression used as: * (a) a call argument (any callee — no name whitelist) * (b) a JSX attribute value * (c) an object-literal property value or array element passed as an argument * (d) an IIFE */ private isAnonymousOrCallback; /** * Returns true if a function_declaration node is nested inside another function/method * (a helper by construction — R1.1). */ private isNestedFunction; /** * A method is non-public if it is private, protected, #-named, or _-prefixed. */ private isNonPublicMethod; /** * Check if a method's enclosing class is exported. */ private isMethodOfExportedClass; /** * Check if a file path matches any picomatch glob pattern. */ private matchesAnyGlob; /** * Check if a name or path matches any exempt regex patterns. */ private isExempt; /** * Get the name of a method definition node. */ private getMethodName; /** * Get the first child node matching one of the given types. */ private getFirstChildOfType; /** * Get file-level documentation (usually at the top). */ private getFileDocumentation; /** * Find a node by its location via BFS. */ private findNodeByLocation; /** * Check which parameters are missing documentation. */ private checkParameterDocumentation; /** * Check if documentation contains return value documentation. */ private hasReturnDocumentation; } //# sourceMappingURL=UniversalDocumentationAnalyzer.d.ts.map