Skip to content

Commit

Permalink
Merge pull request #16 from SublimeLinter/fix-for-4.3
Browse files Browse the repository at this point in the history
Fixes for 4.3
  • Loading branch information
kaste authored Apr 26, 2018
2 parents 7bbfa24 + e460c29 commit 37fabcd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
max-line-length = 120

# D100 Missing docstring in public module
# D101 Missing docstring in public class
# D102 Missing docstring in public method
# D103 Missing docstring in public function
# D104 Missing docstring in public package
# D105 Missing docstring in magic method
# D107 Missing docstring in __init__
ignore = D100,D101,D102,D103,D105,D107

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ python:
install:
- pip install flake8
script:
- flake8 . --max-line-length=120
- flake8
7 changes: 5 additions & 2 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@


class Phpmd(Linter):
cmd = ('phpmd', '${file}', 'text')
cmd = ('phpmd', '${temp_file}', 'text')
regex = (
r'(?P<filename>.+):(?P<line>\d+)'
r'\s*(?P<message>.+)$'
)
on_stderr = None # handle stderr via regex
default_type = WARNING
tempfile_suffix = 'php'
defaults = {
'selector': 'source.php, text.html.basic',
'@rulesets:,': 'cleancode,codesize,controversial,design,naming,unusedcode'
# Not working, see https://github.com/SublimeLinter/SublimeLinter/issues/1349
# '@rulesets:,': 'cleancode,codesize,controversial,design,naming,unusedcode',
'args': 'cleancode,codesize,controversial,design,naming,unusedcode'
}

0 comments on commit 37fabcd

Please sign in to comment.