Skip to content

Commit

Permalink
Merge pull request #18 from SublimeLinter/sl4-cleanup
Browse files Browse the repository at this point in the history
cleanup deprecated stuff and simplify travis test
  • Loading branch information
braver authored Mar 26, 2018
2 parents 5aec1e0 + fe80a68 commit 4d398a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
language: python
python:
- "3.3"
# command to install dependencies
- "3.6"
install:
- pip install flake8
- pip install pydocstyle
# command to run tests
script:
- flake8 *.py --max-line-length=120
- pydocstyle .
25 changes: 4 additions & 21 deletions linter.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Copyright (c) 2015-2017 The SublimeLinter Community
# Copyright (c) 2014 CorvisaCloud, LLC
#
# License: MIT
#

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

from SublimeLinter.lint import Linter


class Luacheck(Linter):
"""Provides an interface to luacheck."""

syntax = 'lua'
cmd = 'luacheck - --formatter=plain --codes --ranges --filename @'

version_args = '--help'
version_re = r'[Ll]uacheck (?P<version>\d+\.\d+\.\d+)'
version_requirement = '>= 0.11.0, < 1.0.0'

cmd = 'luacheck - --formatter=plain --codes --ranges --filename ${file}'
regex = (
r'^.+:(?P<line>\d+):(?P<col>\d+)\-(?P<col_end>\d+): '
r'\((?:(?P<error>E\d+)|(?P<warning>W\d+))\) '
r'(?P<message>.+)'
)
defaults = {
'selector': 'source.lua'
}

def split_match(self, match):
"""Patch regex matches to highlight token correctly."""
Expand Down

0 comments on commit 4d398a5

Please sign in to comment.