<commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by <NAME>
# Copyright (c) 2017 <NAME> <<EMAIL>>
#
# License: MIT
#

"""This module exports the Yamllint plugin class."""

from SublimeLinter.lint import Linter, util


class Yamllint(Linter):
    """Provides an interface to yamllint."""

    defaults = {
        'selector': 'source.yaml',
        '-c': '',  # CONFIG_FILE
        '-d': '',  # CONFIG_DATA, but this is deprecated option
    }

    cmd = ('yamllint', '--format', 'parsable', '${args}', '${temp_file}')
    regex = (
        r'^.+?:(?P<line>\d+):(?P<col>\d+): \[((?P<warning>warning)|(?P<error>error))\] (?P<message>.+)'
    )
    tempfile_suffix = 'yaml'
    error_stream = util.STREAM_STDOUT
    word_re = r'^(".*?"|[-\w]+)'
    module = 'yamllint'<commit_msg>Combine warning/error matches to error_type<commit_after>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by <NAME>
# Copyright (c) 2017 <NAME> <<EMAIL>>
#
# License: MIT
#

"""This module exports the Yamllint plugin class."""

from SublimeLinter.lint import Linter, util


class Yamllint(Linter):
    """Provides an interface to yamllint."""

    defaults = {
        'selector': 'source.yaml',
        '-c': '',  # CONFIG_FILE
        '-d': '',  # CONFIG_DATA, but this is deprecated option
    }

    cmd = ('yamllint', '--format', 'parsable', '${args}', '${temp_file}')
    regex = (
        r'^.+?:(?P<line>\d+):(?P<col>\d+): \[(?P<error_type>[^\]]+)\] (?P<message>.+)'
    )
    tempfile_suffix = 'yaml'
    error_stream = util.STREAM_STDOUT
    word_re = r'^(".*?"|[-\w]+)'
    module = 'yamllint'
{'fraction_non_alphanumeric': 0.2009428403064231, 'fraction_numerical': 0.007071302298173247, 'mean_word_length': 3.3206106870229006, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '1106902', 'n_tokens_mistral': 641, 'n_tokens_neox': 613, 'n_words': 147}