UNPKG

@zubenelakrab/gitstats

Version:

Powerful Git repository analyzer with comprehensive statistics and insights

81 lines 2.29 kB
import type { Commit, AnalysisConfig, Analyzer } from '../types/index.js'; export interface ComplexityStats { godFiles: GodFile[]; growingFiles: GrowingFile[]; refactoringCandidates: RefactoringCandidate[]; averageFileGrowth: number; totalFilesAnalyzed: number; filesWithHighChurn: number; technicalDebtScore: number; debtByModule: ModuleDebt[]; debtTrend: 'increasing' | 'stable' | 'decreasing'; criticalDebtAreas: CriticalDebtArea[]; debtIndicators: DebtIndicator[]; criticalHotspots: CriticalHotspot[]; } export interface CriticalHotspot { path: string; commitCount: number; totalChanges: number; authorCount: number; changeVelocity: number; riskScore: number; riskLevel: 'critical' | 'high' | 'medium'; riskFactors: string[]; } export interface ModuleDebt { path: string; debtScore: number; filesWithDebt: number; totalFiles: number; topIssues: string[]; } export interface CriticalDebtArea { path: string; debtScore: number; reason: string; metrics: { churnRate: number; growthRate: number; authorConcentration: number; }; recommendation: string; } export interface DebtIndicator { name: string; value: number; status: 'good' | 'warning' | 'critical'; description: string; } export interface GodFile { path: string; totalChanges: number; commitCount: number; authorCount: number; reason: string; } export interface GrowingFile { path: string; netGrowth: number; growthRate: number; commitCount: number; trend: 'growing' | 'shrinking' | 'stable'; } export interface RefactoringCandidate { path: string; addDeleteRatio: number; totalAdditions: number; totalDeletions: number; commitCount: number; suggestion: string; } export declare class ComplexityAnalyzer implements Analyzer<ComplexityStats> { name: string; description: string; analyze(commits: Commit[], _config: AnalysisConfig): Promise<ComplexityStats>; private calculateTechnicalDebt; private getDebtRecommendation; private calculateCriticalHotspots; } export declare function createComplexityAnalyzer(): ComplexityAnalyzer; //# sourceMappingURL=complexity-analyzer.d.ts.map