<commit_before>class ValidationError extends Error {

    constructor(validation) {
        super(ValidationError.message);
        this.validation = validation;
        // We don't want to capture the Stack, no useful information there
        this.stack = "";
    }

    // Pretty print the error
    inspect(depth, opts) {

        let validationString = JSON.stringify(this.validation, null, ' ')
            // removes quotes from prop names
            .replace(/\"([^(\")"]+)\":/g,"$1:");

        // ident properly for final string
        const [first, ...rest] = validationString.split('\n');
        const formattedRest = rest.map(s => `  ${s}`);
        validationString = [first, ...formattedRest].join('\n');

        return `{ ${this.toString()}\n  validation: ${validationString}\n}`;
    }

    toString() {
        return `${this.constructor.name}: ${ValidationError.message}`;
    };

    // We don't want to capture the Stack, no useful information there
    captureStackTrace () {}
}

ValidationError.message = "Modern Validator encountered validation error(s).";

module.exports = ValidationError;<commit_msg>remove useless override<commit_after>class ValidationError extends Error {

    constructor(validation) {
        super(ValidationError.message);
        this.validation = validation;
        // We don't want to capture the Stack, no useful information there
        this.stack = "";
    }

    // Pretty print the error
    inspect(depth, opts) {

        let validationString = JSON.stringify(this.validation, null, ' ')
            // removes quotes from prop names
            .replace(/\"([^(\")"]+)\":/g,"$1:");

        // ident properly for final string
        const [first, ...rest] = validationString.split('\n');
        const formattedRest = rest.map(s => `  ${s}`);
        validationString = [first, ...formattedRest].join('\n');

        return `{ ${this.toString()}\n  validation: ${validationString}\n}`;
    }

    toString() {
        return `${this.constructor.name}: ${ValidationError.message}`;
    };
}

ValidationError.message = "Modern Validator encountered validation error(s).";

module.exports = ValidationError;
{'fraction_non_alphanumeric': 0.14917127071823205, 'fraction_numerical': 0.0009208103130755065, 'mean_word_length': 2.6644182124789206, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5358842', 'n_tokens_mistral': 583, 'n_tokens_neox': 569, 'n_words': 149}