-
Notifications
You must be signed in to change notification settings - Fork 37.7k
lint: convert lint-tests.sh to python #24815
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
a0f5d5e
to
e60d9ee
Compare
Maybe I should replace |
74506be
to
25ea0a3
Compare
Ok I converted those functions to python, so the only non-python call is |
292a1d8
to
285ee4b
Compare
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.
utACK 285ee4b
285ee4b
to
b412505
Compare
Below are example outputs, before and after the change. The only difference is that the new version adds a newline after the "matching names" test, which I think improves readability. Before (lint-tests.sh):
After (lint-tests.py):
|
b132506
to
21b967a
Compare
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.
utACk
Not sure but is it a good practise to leave links in the code ?
When I grab a snippet from stackoverflow, I like to leave a link to credit the author but also in case I want to see the original answer again. |
Use raw string Use re.search instead of grep in check_matching_test_names Replaced bash commands in check_unique_test_names with python commands Use set and sort output Use set comprehension Use .splitlines() Call grep_boost_fixture_test_suite once splitlines() once Fixed copyright date Use check_output() instead of run() add encoding='utf8' Use clearer code for getting duplicates
21b967a
to
ae0e06a
Compare
Tested ACK ae0e06a |
ae0e06a Converted lint-tests.sh to python (TakeshiMusgrave) Pull request description: Reference issue: bitcoin#24783 ACKs for top commit: laanwj: Tested ACK ae0e06a Tree-SHA512: a118295b5b6b5199b52d46b54de871d88dd544112e7dd5001a9575d65b093af0aea390f9ad223462a4fc6a201bd8c4debe5e26bfa4860a90c97cfe300477c04a
Reference issue: #24783