Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up things that don't work in SL4 #5

Merged
merged 5 commits into from
Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')