-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from SublimeLinter/sl4
clean up things that don't work in SL4
- Loading branch information
Showing
2 changed files
with
5 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |