Skip to content

Commit

Permalink
improve rr
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenHalman committed Sep 6, 2023
1 parent acaf9b6 commit 62eea19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export function scan(flows: Flow[], ruleOptions?: IRulesConfig): ScanResult[] {
if (ruleOptions?.exceptions) {
for (const [exceptionName, exceptionElements] of Object.entries(ruleOptions.exceptions)) {
for (const scanResult of scanResults) {

if (scanResult.flow.name === exceptionName) {
for (const ruleResult of scanResult.ruleResults as RuleResult[]) {
if (exceptionElements[ruleResult.ruleName]) {
Expand Down
10 changes: 2 additions & 8 deletions src/main/models/RuleResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@ export class RuleResult {

public occurs: boolean;
public ruleName: string;
public ruleLabel: string;
public ruleDescription: string;
public ruleDefinition: IRuleDefinition;
public severity: string;
public supportedFlowTypes: string[]
public type: string;
public details: ResultDetails[] = [];

constructor(info: IRuleDefinition, occurs: boolean, details?: ResultDetails[]) {
this.ruleDefinition = info;
this.ruleName = info.name;
this.ruleDescription = info.description;
this.ruleLabel = info.label;
this.supportedFlowTypes = info.supportedTypes;
this.severity = info.severity ? info.severity : 'error';
this.type = info.type;
this.occurs = occurs;
if (details) {
this.details = details;
Expand Down

0 comments on commit 62eea19

Please sign in to comment.