-
Notifications
You must be signed in to change notification settings - Fork 39
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
Ensure Lightning adheres to C++17 modernization standard with clang-tidy #153
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #153 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 182 182
=========================================
Hits 182 182 Continue to review full report at Codecov.
|
Test Report (C++) on Ubuntu 1 files ±0 1 suites ±0 0s ⏱️ ±0s Results for commit 972bf34. ± Comparison against base commit 238f4d0. This pull request removes 9 and adds 9 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
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.
Great PR! I didn't know that clang-tidy is this powerful really.
…lightning into clang_tidy_checks
Hi @maliasadi , what changes were made to the clang-tidy files? I am having a hard time tracking and comparing them. These are auto-generated with 1 or 2 minor amendments, so I'm having a tough time comparing the new changes you added. Were yours autogenerated too? |
I only re-ordered them w.r.t. their categories and didn't add any new checks there. |
Ah okay. I think we can undo these commits, as any further edits to the autogenerated files will cause a large number of line-changes here. The config used to get these is |
…lightning into clang_tidy_checks
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.
Thanks @mlxd, looks great and amazing to see the speedup! I wonder if it's worth discussing next time we meet about some of the new concepts that may be unfamiliar (at least to me), such as [[nodiscard]]
.
Thanks for the reviews and suggestions all! |
Context: To ensure modern C++ standards, we require testing of newly added code to ensure it is standards-conforming with all newly supported features. This PR enables clang-tidy with warnings-as-errors support for a variety of tidy options as defined from here
Description of the Change: Add CI-enabled checking of code-base builds with clang-tidy for the following options:
Benefits: This will ensure our codebase uses non-legacy and/or deprecated language features, as well as ensuring strict conformance to the modern C++ standard (currently C++17). In addition, this can prevent compiler-specific bugs being uncaught, which can be difficult to find between compiler versions.
Possible Drawbacks: May add additional development time to new features as developer become comfortable with the requirements of the standard.
Related GitHub Issues: