<commit_before>//! Error module.
//! Contains traits and Constants for error printing.

use std::fmt;
use std::fmt::Debug;
use position::span::Span;
extern crate ansi_term;
use self::ansi_term::Color::*;
use self::ansi_term::Color;

/// Color code for errors used throughout entire error reporting system.
///
#[deprecated(since = "0.5.0")]
pub const ERROR_COLORS: [Color; 4] = [
    Red, Cyan, Green, Cyan,
];


/// Enum for error levels.
#[derive(Debug, Copy, Clone)]
pub enum ErrorLevel {Warning, Error}

impl fmt::Display for ErrorLevel {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", match self {
            &ErrorLevel::Warning => Yellow,
            &ErrorLevel::Error   => Red,
        }.paint(format!("{:?}", self)))
    }<commit_msg>Typo.<commit_after>//! Error module.
//! Contains traits and Constants for error printing.

use std::fmt;
use std::fmt::Debug;
use position::span::Span;
extern crate ansi_term;
use self::ansi_term::Color::*;
use self::ansi_term::Color;

/// Color code for errors used throughout entire error reporting system.
#[deprecated(since = "0.5.0")]
pub const ERROR_COLORS: [Color; 4] = [
    Red, Cyan, Green, Cyan,
];


/// Enum for error levels.
#[derive(Debug, Copy, Clone)]
pub enum ErrorLevel {Warning, Error}

impl fmt::Display for ErrorLevel {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", match self {
            &ErrorLevel::Warning => Yellow,
            &ErrorLevel::Error   => Red,
        }.paint(format!("{:?}", self)))
    }
{'fraction_non_alphanumeric': 0.17161290322580644, 'fraction_numerical': 0.005161290322580645, 'mean_word_length': 3.588757396449704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5076710', 'n_tokens_mistral': 502, 'n_tokens_neox': 498, 'n_words': 150}