export function tryFastUpgradeLog()

in src/extension/loadLogs.ts [76:94]


export function tryFastUpgradeLog(log: Log): boolean {
    const { version } = log;
    if (!eq(version, '2.1.0')) return false;

    const schema = log.$schema
        ?.replace('http://json.schemastore.org/sarif-', '')
        ?.replace('https://schemastore.azurewebsites.net/schemas/json/sarif-', '')
        ?.replace(/\.json$/, '');
    switch (schema) {
    case '2.1.0-rtm.1':
    case '2.1.0-rtm.2':
    case '2.1.0-rtm.3':
    case '2.1.0-rtm.4':
        applyRtm5(log);
        return true;
    default:
        return false;
    }
}