mirror of
https://github.com/FoxxMD/context-mod.git
synced 2026-04-19 03:00:07 -04:00
Change pass/fail symbols so they aren't emojis
Makes logging more uniform
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user