diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..1de405e --- /dev/null +++ b/.flake8 @@ -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 + diff --git a/.travis.yml b/.travis.yml index 000f751..09b0e08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,4 @@ python: install: - pip install flake8 script: - - flake8 . --max-line-length=120 + - flake8 diff --git a/linter.py b/linter.py index 90828b4..1768162 100644 --- a/linter.py +++ b/linter.py @@ -2,14 +2,17 @@ class Phpmd(Linter): - cmd = ('phpmd', '${file}', 'text') + cmd = ('phpmd', '${temp_file}', 'text') regex = ( r'(?P.+):(?P\d+)' r'\s*(?P.+)$' ) + 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' }