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

Prerun linter #23

Merged
merged 2 commits into from
Feb 3, 2017
Merged

Prerun linter #23

merged 2 commits into from
Feb 3, 2017

Conversation

heoga
Copy link
Contributor

@heoga heoga commented Jan 20, 2017

This change moves the run of the linter to occur after the collection but before the rest of the tests. This offers two advantages:

  1. By running the linter over all files concurrently, messages such as duplicate-code can be picked up which was not possible previously.
  2. pytest-pylint currently clashes with pytest-cov in that when both are activate linting takes 10x longer than normal. On my project of 83 files linting takes ~690 seconds. This seems to be due to the traceback behaviour of coverage clashing with how astroid assesses syntax. As long as the linter is run within the Items this will always be a problem. By moving the linter ahead of the test run, and altering pytest-cov to start the coverage run later, the clash should be avoidable.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 97.222% when pulling 2ab030f on heoga:prerun-linter into 02f0682 on carsongee:master.

@carsongee
Copy link
Owner

Sorry to be a bit slow to respond, this seems like a great idea! I'd like to run this against a bunch of my projects to make sure there aren't any integration issues, and I'll get back to you in a day or so, and thanks so much for the contribution ✨

@heoga
Copy link
Contributor Author

heoga commented Feb 1, 2017

Just to clarify, I haven't got a PR for the pytest-cov aspect of the performance problem yet. Working on it, but it's proving a little more challenging.

@carsongee
Copy link
Owner

I'm going to go ahead and merge this and cut a release. Things seem to be around the same speed to a little faster, and the duplicate code errors are great. Thanks so much for the contribution!

@carsongee carsongee merged commit 19932f2 into carsongee:master Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants