Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/util/RapLPDiagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import { RapLPCustomSpectralDiagnostic } from './RapLPCustomSpectralDiagnostic.js';
import { RuleExecutionLog, RuleExecutionContext } from './RuleExecutionContext.js';
import { buildRuleHelpUrl } from '../rulesets/util/rules-doc.config.js';

class RapLPDiagnostic {
private _ruleSets: DiagnosticRuleinfoSet = {
Expand Down Expand Up @@ -55,6 +56,7 @@ class RapLPDiagnostic {
id: customProperties.id, // Store some more diagnostic info (Duplicate NOT OK)
område: customProperties.område,
krav: rules[key]?.message ?? '',
helpUrl: customProperties.id ? buildRuleHelpUrl(customProperties.id) : undefined,
});
}
}
Expand All @@ -68,6 +70,7 @@ class RapLPDiagnostic {
id: customProperties.id, // Store some more diagnostic info (Duplicate OK)
område: customProperties.område,
krav:rules[key]?.message ?? '',
helpUrl: customProperties.id ? buildRuleHelpUrl(customProperties.id) : undefined,
});
}
executedRuleIds.add(customProperties.id); // Store current ID of rule with NO error
Expand All @@ -82,7 +85,12 @@ class RapLPDiagnostic {
});
if (!ruleIdsNotApplicable.has(customProperties.id) && !exists) {
// If not present, store the id and område in the not applicableRules
this._ruleSets.notApplicableRules.push({ id: customProperties.id, område: customProperties.område, krav: rules[key]?.message ?? ''}); // Rules
this._ruleSets.notApplicableRules.push({
id: customProperties.id,
område: customProperties.område,
krav: rules[key]?.message ?? '',
helpUrl: customProperties.id ? buildRuleHelpUrl(customProperties.id) : undefined,
}); // Rules
}
}
}
Expand Down Expand Up @@ -161,6 +169,9 @@ interface DiagnosticRuleInfo {
id: string;
område: string;
krav: string;
/**Helper Url for guidelines */
helpUrl?: string;

}
interface PopulatedDiagnosticRuleInfo extends DiagnosticRuleInfo {
status: string;
Expand Down