-
Notifications
You must be signed in to change notification settings - Fork 38.6k
lint: Convert lint-include-guards.sh to Python #24902
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
lint: Convert lint-include-guards.sh to Python #24902
Conversation
|
Concept ACK Note that there is currently a linter error in the CI: |
test/lint/lint-include-guards.py
Outdated
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.
I prefer to open files using with, it ensures that the file will be closed at the end of the operation.
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.
Good catch!
|
I tested ea3e7abc45730e7a6eb1e840c6fa40780b3dee2f by commenting out the include guard in Before ( After ( If I delete (rather than comment out) the include guard, then it prints the correct message. |
Specify encoding when reading header files, add docstring Update test/lint/lint-include-guards.py include guard count logic Co-authored-by: Kevin Musgrave <[email protected]> Update test/lint/lint-include-guards.py by removing whitespace
3f9f09f to
d5fdec5
Compare
|
Tested ACK d5fdec5 Outputs and exit codes match. Example: |
|
Code review ACK d5fdec5 |
This PR addresses issue 24783. Converted lint-include-guards.sh to python.