-
Notifications
You must be signed in to change notification settings - Fork 38.7k
tests: Add Python dead code linter (vulture) to Travis #14365
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
Conversation
69e9438 to
ba76e96
Compare
|
I've tested this linter over the set of all open mergeable pull requests. A total of 196 pull requests were tested:
A precision score of 100 percent :-) |
7d88eb5 to
6d3822d
Compare
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my system it takes around 1 second so it's not a big deal.
I suggest closing #14312.
|
@promag Thanks for reviewing. Good idea! Done. |
6d3822d to
acc7213
Compare
|
@MarcoFalke Updated. Please re-review :-) |
ff94da7 tests: Make appveyor run with --usecli (practicalswift) db01839 test: Add missing call to skip_if_no_cli() (practicalswift) Pull request description: Add missing call to `skip_if_no_cli()` as suggested by @MarcoFalke in bitcoin#14365. Tree-SHA512: b0a2ddfad0f81cc9544f63c4e490fb983d833a47c23522549d1200ea6a8a132b2cd4bf0d66b862ef3a548d8471128b80aea3525fb5dec65221e23f32a8d46746
acc7213 to
93f965c
Compare
|
Should explicitly set |
93f965c to
e3a08ac
Compare
|
@promag Judging from my testing of |
|
My suggestion is to add Also, from the vulture documentation:
WDYT? |
e3a08ac to
2348ebf
Compare
|
@promag I've not added an explicit Regarding the white-list method: I'm afraid a whitelist replicating the current wildcard based method would be quite long. And perhaps burdensome to keep updated. The trade-off looks like this: Versus: Despite the recommendation I think |
You have. |
2348ebf to
c422cf2
Compare
Oh, "not" should have been "now" :-D |
|
utACK c422cf2b50b08b489172de28f69083784c35a455 |
1 similar comment
|
utACK c422cf2b50b08b489172de28f69083784c35a455
|
|
utACk c422cf2b50b08b489172de28f69083784c35a455 - vulture is great! |
|
Added a commit which pins the Please re-review :-) |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
7c2dd72 to
5c6e977
Compare
5c6e977 to
c82190c
Compare
|
Going to merge this since it had 3 utACKs and is probably not worth to wait for all re-ACKs. |
c82190c tests: Add Python dead code linter (vulture) (practicalswift) 590a57f tests: Remove unused testing code (practicalswift) Pull request description: Add Python dead code linter (`vulture`) to Travis. Rationale for allowing dead code only after explicit opt-in (via `--ignore-names`): * Less is more :-) * Unused code is by definition "untested" * Unused code can be an indication of bugs/logical errors. By making the contributor aware of newly introduced unused code it gives him/her an opportunity to investigate if the unused code they introduce is malignant or benign :-) * Unused code is hard to spot for humans and is thus often missed during manual review * [YAGNI](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it) Based on #14312 to make linter job pass. Tree-SHA512: 4c581df7c34986e226e4ade479e0d3c549daf38f4a4dc4564b25564d63e773a1830ba55d1289c771b1fa325483e8855b82b56e61859fe8e4b7dfa54034b093b6
Summary: Removal of dead python code Partial backport of [[bitcoin/bitcoin#14365 | PR14365]] Commit bitcoin/bitcoin@590a57f Depends on D7981 (backported out of order) Test Plan: `ninja && ninja check-functional` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7987
…Travis c82190c tests: Add Python dead code linter (vulture) (practicalswift) 590a57f tests: Remove unused testing code (practicalswift) Pull request description: Add Python dead code linter (`vulture`) to Travis. Rationale for allowing dead code only after explicit opt-in (via `--ignore-names`): * Less is more :-) * Unused code is by definition "untested" * Unused code can be an indication of bugs/logical errors. By making the contributor aware of newly introduced unused code it gives him/her an opportunity to investigate if the unused code they introduce is malignant or benign :-) * Unused code is hard to spot for humans and is thus often missed during manual review * [YAGNI](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it) Based on bitcoin#14312 to make linter job pass. Tree-SHA512: 4c581df7c34986e226e4ade479e0d3c549daf38f4a4dc4564b25564d63e773a1830ba55d1289c771b1fa325483e8855b82b56e61859fe8e4b7dfa54034b093b6
…Travis c82190c tests: Add Python dead code linter (vulture) (practicalswift) 590a57f tests: Remove unused testing code (practicalswift) Pull request description: Add Python dead code linter (`vulture`) to Travis. Rationale for allowing dead code only after explicit opt-in (via `--ignore-names`): * Less is more :-) * Unused code is by definition "untested" * Unused code can be an indication of bugs/logical errors. By making the contributor aware of newly introduced unused code it gives him/her an opportunity to investigate if the unused code they introduce is malignant or benign :-) * Unused code is hard to spot for humans and is thus often missed during manual review * [YAGNI](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it) Based on bitcoin#14312 to make linter job pass. Tree-SHA512: 4c581df7c34986e226e4ade479e0d3c549daf38f4a4dc4564b25564d63e773a1830ba55d1289c771b1fa325483e8855b82b56e61859fe8e4b7dfa54034b093b6
ff94da7 tests: Make appveyor run with --usecli (practicalswift) db01839 test: Add missing call to skip_if_no_cli() (practicalswift) Pull request description: Add missing call to `skip_if_no_cli()` as suggested by @MarcoFalke in bitcoin#14365. Tree-SHA512: b0a2ddfad0f81cc9544f63c4e490fb983d833a47c23522549d1200ea6a8a132b2cd4bf0d66b862ef3a548d8471128b80aea3525fb5dec65221e23f32a8d46746
ff94da7 tests: Make appveyor run with --usecli (practicalswift) db01839 test: Add missing call to skip_if_no_cli() (practicalswift) Pull request description: Add missing call to `skip_if_no_cli()` as suggested by @MarcoFalke in bitcoin#14365. Tree-SHA512: b0a2ddfad0f81cc9544f63c4e490fb983d833a47c23522549d1200ea6a8a132b2cd4bf0d66b862ef3a548d8471128b80aea3525fb5dec65221e23f32a8d46746
ff94da7 tests: Make appveyor run with --usecli (practicalswift) db01839 test: Add missing call to skip_if_no_cli() (practicalswift) Pull request description: Add missing call to `skip_if_no_cli()` as suggested by @MarcoFalke in bitcoin#14365. Tree-SHA512: b0a2ddfad0f81cc9544f63c4e490fb983d833a47c23522549d1200ea6a8a132b2cd4bf0d66b862ef3a548d8471128b80aea3525fb5dec65221e23f32a8d46746
…Travis c82190c tests: Add Python dead code linter (vulture) (practicalswift) 590a57f tests: Remove unused testing code (practicalswift) Pull request description: Add Python dead code linter (`vulture`) to Travis. Rationale for allowing dead code only after explicit opt-in (via `--ignore-names`): * Less is more :-) * Unused code is by definition "untested" * Unused code can be an indication of bugs/logical errors. By making the contributor aware of newly introduced unused code it gives him/her an opportunity to investigate if the unused code they introduce is malignant or benign :-) * Unused code is hard to spot for humans and is thus often missed during manual review * [YAGNI](https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it) Based on bitcoin#14312 to make linter job pass. Tree-SHA512: 4c581df7c34986e226e4ade479e0d3c549daf38f4a4dc4564b25564d63e773a1830ba55d1289c771b1fa325483e8855b82b56e61859fe8e4b7dfa54034b093b6
Add Python dead code linter (
vulture) to Travis.Rationale for allowing dead code only after explicit opt-in (via
--ignore-names):Based on #14312 to make linter job pass.