axe-sarif-converter
Version:
Convert axe-core accessibility scan results to the SARIF format
21 lines (20 loc) • 1.01 kB
TypeScript
import * as Axe from 'axe-core';
import * as Sarif from 'sarif';
import { AxeRawResult } from './axe-raw-result';
import { DictionaryStringTo } from './dictionary-types';
export declare class ResultToRuleConverter {
private readonly ruleIdsToRuleIndices;
private readonly rulesDictionary;
private sortedRuleIds;
static fromRawResults(results: AxeRawResult[], axeTags: string[], wcagTagsToTaxaIndices: DictionaryStringTo<number>): ResultToRuleConverter;
static fromV2Results(results: Axe.AxeResults, axeTags: string[], wcagTagsToTaxaIndices: DictionaryStringTo<number>): ResultToRuleConverter;
private constructor();
getRulePropertiesFromResults(): Sarif.ReportingDescriptor[];
getRuleIdsToRuleIndices(): DictionaryStringTo<number>;
private sortRuleIds;
private indexRuleIds;
private static convertV2ResultsToRules;
private static convertResultsToRules;
private static convertAxeResultToSarifRule;
private static getRuleRelationshipsFromResultTags;
}