"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseLintLabel = parseLintLabel;
exports.stripNotRunSuffix = stripNotRunSuffix;
const NOT_RUN_RE = /\s*\(not run:\s*([^)]*)\)/;
function parseLintLabel(label) {
    const match = NOT_RUN_RE.exec(label);
    if (!match)
        return { tool: label.trim(), notRunPacks: null };
    return {
        tool: label.replace(NOT_RUN_RE, '').trim(),
        notRunPacks: match[1].trim() || null,
    };
}
/**
 * Convenience: just the tool name, suffix stripped. Equivalent to
 * `parseLintLabel(label).tool`. Common case at Tools-used-footer
 * construction sites.
 */
function stripNotRunSuffix(label) {
    return parseLintLabel(label).tool;
}
//# sourceMappingURL=lint-label.js.map