@samiyev/guardian
Version:
Research-backed code quality guardian for AI-assisted development. Detects hardcodes, secrets, circular deps, framework leaks, entity exposure, and 9 architecture violations. Enforces Clean Architecture/DDD principles. Works with GitHub Copilot, Cursor, W
30 lines • 1.35 kB
TypeScript
import Parser from "tree-sitter";
import { NamingViolation } from "../../../domain/value-objects/NamingViolation";
import { AstClassNameAnalyzer } from "./AstClassNameAnalyzer";
import { AstFunctionNameAnalyzer } from "./AstFunctionNameAnalyzer";
import { AstInterfaceNameAnalyzer } from "./AstInterfaceNameAnalyzer";
import { AstVariableNameAnalyzer } from "./AstVariableNameAnalyzer";
/**
* AST tree traverser for detecting naming convention violations
*
* Walks through the Abstract Syntax Tree and uses analyzers
* to detect naming violations in classes, interfaces, functions, and variables.
*/
export declare class AstNamingTraverser {
private readonly classAnalyzer;
private readonly interfaceAnalyzer;
private readonly functionAnalyzer;
private readonly variableAnalyzer;
private readonly nodeHandlers;
constructor(classAnalyzer: AstClassNameAnalyzer, interfaceAnalyzer: AstInterfaceNameAnalyzer, functionAnalyzer: AstFunctionNameAnalyzer, variableAnalyzer: AstVariableNameAnalyzer);
/**
* Traverses the AST tree and collects naming violations
*/
traverse(tree: Parser.Tree, sourceCode: string, layer: string, filePath: string): NamingViolation[];
private buildNodeHandlers;
/**
* Recursively visits AST nodes
*/
private visit;
}
//# sourceMappingURL=AstNamingTraverser.d.ts.map