UNPKG

@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

37 lines 1.28 kB
import Parser from "tree-sitter"; import { NamingViolation } from "../../../domain/value-objects/NamingViolation"; /** * AST-based analyzer for detecting class naming violations * * Analyzes class declaration nodes to ensure proper naming conventions: * - Domain layer: PascalCase entities and services (*Service) * - Application layer: PascalCase use cases (Verb+Noun), DTOs (*Dto/*Request/*Response) * - Infrastructure layer: PascalCase controllers, repositories, services */ export declare class AstClassNameAnalyzer { /** * Analyzes a class declaration node */ analyze(node: Parser.SyntaxNode, layer: string, filePath: string, _lines: string[]): NamingViolation | null; /** * Checks domain layer class naming */ private checkDomainClass; /** * Checks application layer class naming */ private checkApplicationClass; /** * Checks infrastructure layer class naming */ private checkInfrastructureClass; /** * Checks if class name starts with a common use case verb */ private startsWithCommonVerb; /** * Checks if class name starts with a lowercase verb (camelCase use case) */ private startsWithLowercaseVerb; } //# sourceMappingURL=AstClassNameAnalyzer.d.ts.map