import { Resource } from "@aws-cdk/core" ; import { Reportable } from "./reporter" ; import { IPolicy } from "./policy" ; export class AwsCdkReporter implements Reportable { private violations : Resource [ ] = [ ] ; public generateReport ( ) { } public hasViolations ( ) { return this . violations . length > 0 ; } public addInfo ( node , policy , message ) { this . violations . push ( node ) ; node . node . addInfo ( message ) ; } public addWarning ( node , policy , message ) { this . violations . push ( node ) ; node . node . addWarning ( message ) ; } public addError ( node , policy , message ) { this . violations . push ( node ) ; node . node . addError ( message ) ; } }