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

Enhance linting #84

Open
bastelfreak opened this issue Apr 29, 2016 · 3 comments
Open

Enhance linting #84

bastelfreak opened this issue Apr 29, 2016 · 3 comments
Milestone

Comments

@bastelfreak
Copy link
Member

vulture can scan for unused variables, params etc. We should clean up our codebase and integrate the tool.

@bastelfreak bastelfreak added this to the v2.0.0 milestone Apr 29, 2016
@bastelfreak bastelfreak changed the title extend prospector with vulture Enhance linting Apr 29, 2016
@bastelfreak
Copy link
Member Author

I also started a longterm branch to enhance the general linting. The current prospector.yaml:

die-on-tool-error: true
test-warnings: true
doc-warnings: true
ignore-paths:
  - marmoset/virt/__init__.py
uses:
  - flask
pep257:
  run: true
  disable:
    - D203
pep8:
  run: true
  full: true
pyroma:
  run: true
pylint:
  run: true
dodgy:
  run: true
mccabe:
  run: true

This currently finds 172 warnings, most of them missings docstrings.

@bastelfreak
Copy link
Member Author

The current .prospector.yaml:

test-warnings: true
doc-warnings: true
ignore-paths:
  - marmoset/virt/
uses:
  - flask
pep257:
  run: true
  disable:
    - D203
pep8:
  run: true
  full: true
pyroma:
  run: true
pylint:
  run: true
  enable:
    - unused-variable
    - invalid-name
dodgy:
  run: true
mccabe:
  run: true

and the recommended tox.ini:

[tox]
envlist = py3{4,5}, pypy3

[testenv]
deps =
  nose
  -rrequirements.txt

[testenv:test]
commands=nosetests

[testenv:testxunit]
commands=nosetests --with-xunit

[testenv:lint]
deps =
    {[testenv]deps}
    maxcdn
    astroid
    pylint
    prospector[with_everything]
commands =
    prospector \
    --die-on-tool-error

[testenv:sphinx]
deps =
    {[testenv]deps}
    sphinx
commands = python setup.py build_sphinx

we will merge the current changes into master (except for the updated prospector to keep travis green).

@bastelfreak
Copy link
Member Author

Part of the needed changes are implemented in #89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant