axe-sarif-converter
Version:
Convert axe-core accessibility scan results to the SARIF format
24 lines (23 loc) • 1.16 kB
TypeScript
import * as Axe from 'axe-core';
import * as Sarif from 'sarif';
import { ConverterOptions } from './converter-options';
import { EnvironmentData } from './environment-data';
export declare function defaultSarifConverter(): SarifConverter;
export declare class SarifConverter {
private getConverterToolProperties;
private getAxeProperties;
private invocationConverter;
private getArtifactProperties;
private readonly tagsToWcagLinkData;
private readonly wcagLinkDataIndexer;
constructor(getConverterToolProperties: () => Sarif.Run['conversion'], getAxeProperties: (environmentData: EnvironmentData) => Sarif.ToolComponent, invocationConverter: (environmentData: EnvironmentData) => Sarif.Invocation[], getArtifactProperties: (environmentData: EnvironmentData) => Sarif.Artifact);
convert(results: Axe.AxeResults, options: ConverterOptions): Sarif.Log;
private convertRun;
private convertResults;
private convertRuleResults;
private convertRuleResult;
private getLogicalLocations;
private formatLogicalLocation;
private convertRuleResultsWithoutNodes;
private getResultLevelFromResultKind;
}