Change pass/fail symbols so they aren't emojis

Makes logging more uniform
This commit is contained in:
FoxxMD
2021-06-22 10:52:01 -04:00
parent 93bdb89115
commit 03b2cb36ab
2 changed files with 6 additions and 7 deletions

View File

@@ -199,28 +199,27 @@ export class Check implements ICheck {
if (passed === null) {
continue;
}
debugger;
runOne = true;
if (passed) {
if (this.condition === 'OR') {
this.logger.info(` => Rules: ${resultsSummary(allResults, this.condition)}`);
this.logger.info(`✔ => Rules: ${resultsSummary(allResults, this.condition)}`);
return [true, allRuleResults];
}
} else if (this.condition === 'AND') {
this.logger.info(` => Rules: ${resultsSummary(allResults, this.condition)}`);
this.logger.verbose(` => Rules: ${resultsSummary(allResults, this.condition)}`);
return [false, allRuleResults];
}
}
if (!runOne) {
this.logger.verbose(' => All Rules skipped because of Author checks or itemIs tests');
this.logger.verbose(' => All Rules skipped because of Author checks or itemIs tests');
return [false, allRuleResults];
} else if(this.condition === 'OR') {
// if OR and did not return already then none passed
this.logger.verbose(` => Rules: ${resultsSummary(allResults, this.condition)}`);
this.logger.verbose(` => Rules: ${resultsSummary(allResults, this.condition)}`);
return [false, allRuleResults];
}
// otherwise AND and did not return already so all passed
this.logger.info(` => Rules: ${resultsSummary(allResults, this.condition)}`);
this.logger.info(`✔ => Rules: ${resultsSummary(allResults, this.condition)}`);
return [true, allRuleResults];
}

View File

@@ -207,7 +207,7 @@ export const triggeredIndicator = (val: boolean | null): string => {
if(val === null) {
return '-';
}
return val ? '✔' : '';
return val ? '✔' : '';
}
export const resultsSummary = (results: (RuleResult|RuleSetResult)[], topLevelCondition: 'OR' | 'AND'): string => {