code-auditor-mcp
Version:
Multi-language code quality auditor with MCP server - Analyze TypeScript, JavaScript, and Go code for SOLID principles, DRY violations, security patterns, and more
64 lines • 2.01 kB
TypeScript
/**
* Universal SOLID Principles Analyzer
* Works across multiple programming languages using the adapter pattern
*/
import { UniversalAnalyzer } from '../../languages/UniversalAnalyzer.js';
import type { Violation } from '../../types.js';
import type { AST, LanguageAdapter } from '../../languages/types.js';
/**
* Configuration for SOLID analyzer
*/
export interface SOLIDAnalyzerConfig {
maxMethodsPerClass?: number;
maxLinesPerMethod?: number;
maxParametersPerMethod?: number;
maxClassComplexity?: number;
maxInterfaceMembers?: number;
checkDependencyInversion?: boolean;
checkInterfaceSegregation?: boolean;
checkLiskovSubstitution?: boolean;
skipTestFiles?: boolean;
}
export declare const DEFAULT_SOLID_CONFIG: SOLIDAnalyzerConfig;
export declare class UniversalSOLIDAnalyzer extends UniversalAnalyzer {
readonly name = "solid";
readonly description = "Detects violations of SOLID principles";
readonly category = "architecture";
protected analyzeAST(ast: AST, adapter: LanguageAdapter, config: SOLIDAnalyzerConfig, sourceCode: string): Promise<Violation[]>;
/**
* Analyze a class for SOLID violations
*/
private analyzeClass;
/**
* Analyze a function for SOLID violations
*/
private analyzeFunction;
/**
* Analyze an interface for Interface Segregation Principle
*/
private analyzeInterface;
/**
* Calculate class complexity
*/
private calculateClassComplexity;
/**
* Check for modification patterns (Open/Closed Principle)
*/
private hasModificationPatterns;
/**
* Check Liskov Substitution Principle
*/
private checkLiskovSubstitution;
/**
* Check Dependency Inversion Principle
*/
private checkDependencyInversion;
/**
* Helper methods
*/
private isTestFile;
private isPrimitiveConstructor;
private findNodeByLocation;
private walkAST;
}
//# sourceMappingURL=UniversalSOLIDAnalyzer.d.ts.map