Skip to content

Commit

Permalink
Merge pull request #5 from SublimeLinter/sl4
Browse files Browse the repository at this point in the history
clean up things that don't work in SL4
  • Loading branch information
braver committed Mar 26, 2018
2 parents 9a97585 + 69fd3af commit 643e2b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 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 . --max-line-length=120
- pydocstyle . --add-ignore=D202
28 changes: 4 additions & 24 deletions linter.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,17 @@
#
# linter.py
# Linter for SublimeLinter, a code checking framework for Sublime Text 3
#
# Written by Eric Brown
# Copyright (c) 2016 Eric Brown
#
# License: MIT
#

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

from SublimeLinter.lint import PythonLinter
from SublimeLinter.lint import util
from SublimeLinter.lint import PythonLinter, util


class Bandit(PythonLinter):
"""Provides an interface to bandit."""

syntax = 'python'
cmd = ('bandit@python', '*', '-n', '1', '-f', 'txt', '-')
version_args = '--version'
version_re = r'^bandit\s(?P<version>\d+.\d+.\d+)'
version_requirement = '>= 1.3.0'
cmd = ('bandit', '${args}', '-n', '1', '-f', 'txt', '-')
regex = (
r'^>>\sIssue:\s\[(?P<code>[B]\d+):.+\]\s(?P<message>.+)$\r?\n'
r'^.*Severity:\s(?:(?P<error>High)|(?P<warning>(Medium|Low))).*$\r?\n'
r'^.*Location:.*:(?P<line>\d+)$\r?\n'
)
multiline = True
error_stream = util.STREAM_BOTH
config_file = ('--ini', '.bandit')
defaults = {
'selector': 'source.python',
'--tests,': '',
'--skips,': '',
'--skips,': ''
}
inline_overrides = ('tests', 'skips')

0 comments on commit 643e2b7

Please sign in to comment.