<commit_before># -*- coding: utf-8 -*-
# lua.py - sublimelint package for checking lua files

import re
from base_linter import BaseLinter

CONFIG = {
    'language': 'Lua',
    'executable': 'luac',
    'lint_args': '-'
}


class Linter(BaseLinter):

    def parse_errors(self, view, errors, lines, errorUnderlines, violationUnderlines, warningUnderlines, errorMessages, violationMessages, warningMessages):
        for line in errors.splitlines():
            match = re.match(r'^.+:(?P<line>\d+):\s+(?P<error>.+)', line)

            if match:
                error, line = match.group('error'), match.group('line')
                self.add_message(int(line), lines, error, errorMessages)<commit_msg>Adding -p flag to the Lua syntax check; this will reduce output file noise.<commit_after># -*- coding: utf-8 -*-
# lua.py - sublimelint package for checking lua files

import re
from base_linter import BaseLinter

CONFIG = {
    'language': 'Lua',
    'executable': 'luac',
    'lint_args': ['-p', '-'],
}


class Linter(BaseLinter):

    def parse_errors(self, view, errors, lines, errorUnderlines, violationUnderlines, warningUnderlines, errorMessages, violationMessages, warningMessages):
        for line in errors.splitlines():
            match = re.match(r'^.+:(?P<line>\d+):\s+(?P<error>.+)', line)

            if match:
                error, line = match.group('error'), match.group('line')
                self.add_message(int(line), lines, error, errorMessages)
{'fraction_non_alphanumeric': 0.14895057549085985, 'fraction_numerical': 0.0013540961408259986, 'mean_word_length': 3.2716763005780347, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6317474', 'n_tokens_mistral': 462, 'n_tokens_neox': 441, 'n_words': 117}