@syntropysoft/praetorian
Version:
Praetorian CLI – A universal multi-environment configuration validator for DevSecOps teams. Validate, compare, and secure YAML/ENV files with ease.
66 lines • 1.77 kB
TypeScript
/**
* TODO: IMPERATIVE PROGRAMMING PATTERN - NEEDS REFACTORING
*
* This file demonstrates imperative programming practices that make testing difficult:
* - Imperative for loops (line 75-79)
* - Switch statements with side effects
* - Complex nested conditionals
* - Mutable state handling
* - Multiple responsibilities in single methods
*
* Mutation Score: 9.57% - Imperative patterns make testing fragile!
*
* RECOMMENDATION: Refactor to use:
* - Functional array methods (map, filter, reduce)
* - Strategy pattern for audit types
* - Pure functions with immutable data
* - Composition over inheritance
*/
import { AuditResult, ValidationContext } from '../../shared/types';
interface AuditEngineOptions {
plugins?: string[];
types?: string[];
strict?: boolean;
}
export declare class AuditEngine {
private validator;
private calculator;
private securityAuditor;
private complianceAuditor;
private performanceAuditor;
private options;
constructor(options?: AuditEngineOptions);
/**
* Run a comprehensive audit
*/
audit(context: ValidationContext, options?: {
type?: string;
[key: string]: any;
}): Promise<AuditResult>;
/**
* Run all configured audit types
*/
private runAllAudits;
/**
* Run a specific type of audit
*/
private runAuditType;
/**
* Build successful audit result
*/
private buildAuditResult;
/**
* Build error result
*/
private buildErrorResult;
/**
* Create result for unknown audit type
*/
private createUnknownAuditResult;
/**
* Add properties expected by tests
*/
private addTestProperties;
}
export {};
//# sourceMappingURL=AuditEngine.d.ts.map