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

"""This module exports the GJSLint plugin linter class."""

from SublimeLinter.lint import Linter


class GJSLint(Linter):

    """Provides an interface to the gjslint executable."""

    syntax = ('javascript', 'html')
    cmd = 'gjslint --nobeep --nosummary'
    regex = r'^Line (?P<line>\d+), (?:(?P<error>E)|(?P<warning>W)):\d+: (?P<message>[^"]+(?P<near>"[^"]+")?)'
    comment_re = r'\s*/[/*]'
    defaults = {
        '--jslint_error:,+': '',
        '--disable:,': '',
        '--max_line_length:': None
    }
    inline_settings = 'max_line_length'
    inline_overrides = 'disable'
    tempfile_suffix = 'js'
    selectors = {
        'html': 'source.js.embedded.html'
    }
    config_file = ('--flagfile', '.gjslintrc', '~')
<commit_msg>Bugfix show the whole error message (was chopped after doble quote)<commit_after>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by <NAME>
# Copyright (c) 2013 <NAME>
#
# License: MIT
#

"""This module exports the GJSLint plugin linter class."""

from SublimeLinter.lint import Linter


class GJSLint(Linter):

    """Provides an interface to the gjslint executable."""

    syntax = ('javascript', 'html')
    cmd = 'gjslint --nobeep --nosummary'
    regex = r'^Line (?P<line>\d+), (?:(?P<error>E)|(?P<warning>W)):\d+: (?P<message>[^"]+(?P<near>"[^"]+")?.*$)'
    comment_re = r'\s*/[/*]'
    defaults = {
        '--jslint_error:,+': '',
        '--disable:,': '',
        '--max_line_length:': None
    }
    inline_settings = 'max_line_length'
    inline_overrides = 'disable'
    tempfile_suffix = 'js'
    selectors = {
        'html': 'source.js.embedded.html'
    }
    config_file = ('--flagfile', '.gjslintrc', '~')

{'fraction_non_alphanumeric': 0.1953659820958399, 'fraction_numerical': 0.00631911532385466, 'mean_word_length': 3.3181818181818183, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '438575', 'n_tokens_mistral': 732, 'n_tokens_neox': 691, 'n_words': 158}