Skip to content

Commit 643e2b7

Browse files
authored
Merge pull request #5 from SublimeLinter/sl4
clean up things that don't work in SL4
2 parents 9a97585 + 69fd3af commit 643e2b7

File tree

2 files changed

+5
-29
lines changed

2 files changed

+5
-29
lines changed

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
language: python
22
python:
3-
- "3.3"
4-
# command to install dependencies
3+
- "3.6"
54
install:
65
- pip install flake8
7-
- pip install pydocstyle
8-
# command to run tests
96
script:
107
- flake8 . --max-line-length=120
11-
- pydocstyle . --add-ignore=D202

linter.py

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,17 @@
1-
#
2-
# linter.py
3-
# Linter for SublimeLinter, a code checking framework for Sublime Text 3
4-
#
5-
# Written by Eric Brown
6-
# Copyright (c) 2016 Eric Brown
7-
#
8-
# License: MIT
9-
#
10-
11-
"""This module exports the Bandit plugin class."""
12-
13-
from SublimeLinter.lint import PythonLinter
14-
from SublimeLinter.lint import util
1+
from SublimeLinter.lint import PythonLinter, util
152

163

174
class Bandit(PythonLinter):
18-
"""Provides an interface to bandit."""
19-
20-
syntax = 'python'
21-
cmd = ('bandit@python', '*', '-n', '1', '-f', 'txt', '-')
22-
version_args = '--version'
23-
version_re = r'^bandit\s(?P<version>\d+.\d+.\d+)'
24-
version_requirement = '>= 1.3.0'
5+
cmd = ('bandit', '${args}', '-n', '1', '-f', 'txt', '-')
256
regex = (
267
r'^>>\sIssue:\s\[(?P<code>[B]\d+):.+\]\s(?P<message>.+)$\r?\n'
278
r'^.*Severity:\s(?:(?P<error>High)|(?P<warning>(Medium|Low))).*$\r?\n'
289
r'^.*Location:.*:(?P<line>\d+)$\r?\n'
2910
)
3011
multiline = True
3112
error_stream = util.STREAM_BOTH
32-
config_file = ('--ini', '.bandit')
3313
defaults = {
14+
'selector': 'source.python',
3415
'--tests,': '',
35-
'--skips,': '',
16+
'--skips,': ''
3617
}
37-
inline_overrides = ('tests', 'skips')

0 commit comments

Comments
 (0)