-
Notifications
You must be signed in to change notification settings - Fork 243
Tidier public headers #7451
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
Tidier public headers #7451
Conversation
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.
Pull Request Overview
This PR improves the tidiness and consistency of public headers by applying clang-tidy rules to additional header directories. The changes focus on modernizing C++ constructs and making headers more maintainable.
Key changes:
- Expands clang-tidy's header filter regex to cover more public header directories
- Adds explicit underlying types to several enums for better ABI stability
- Modernizes member initialization, parameter passing, and virtual method declarations
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .clang-tidy | Expands header filter regex to include node, kv, js, indexing, and endpoints directories |
| include/ccf/node/startup_config.h | Removes redundant = {} initializers for default-constructible types |
| include/ccf/node/quote.h | Adds explicit uint8_t underlying type to QuoteVerificationResult enum |
| include/ccf/node/node_configuration_interface.h | Changes destructor from virtual to override |
| include/ccf/node/cose_signatures_config.h | Removes redundant empty string initializers |
| include/ccf/js/tx_access.h | Adds explicit uint8_t underlying type to TxAccess enum |
| include/ccf/js/registry.h | Adds [[maybe_unused]] attributes and removes const from span parameter |
| include/ccf/js/kv_access_permissions.h | Adds explicit uint8_t underlying type to KVAccessPermissions enum |
| include/ccf/js/interpreter_cache_interface.h | Changes destructor from virtual to override |
| include/ccf/js/extensions/console.h | Removes const from TxAccess parameter (pass-by-value for cheap types) |
| include/ccf/js/extensions/ccf/kv.h | Adds override keyword to destructor and install method |
| include/ccf/js/extensions/ccf/historical.h | Adds override keyword to destructor |
| include/ccf/js/core/wrapped_property_enum.h | Adds [[nodiscard]] attribute to size() method |
| include/ccf/js/core/runtime.h | Adds explicit uint8_t underlying type to RuntimeLimitsPolicy enum |
| include/ccf/js/core/context.h | Adds default member initialization, removes const from span, simplifies type inference |
| include/ccf/js/audit_format.h | Adds explicit uint8_t underlying type to ActionFormat enum |
| include/ccf/indexing/strategy.h | Changes constructor parameter to pass-by-value with move for efficiency |
| include/ccf/indexing/strategies/visit_each_entry_in_map.h | Changes destructor from virtual to override |
| include/ccf/indexing/strategies/seqnos_by_key_bucketed.h | Adds [[nodiscard]] attribute to max_requestable_range() method |
| include/ccf/indexing/indexer_interface.h | Changes destructor from virtual to override |
| include/ccf/entity_id.h | Adds move constructor |
| include/ccf/endpoints/authentication/jwt_auth.h | Changes destructor to override and adds [[nodiscard]] with reformatting |
| include/ccf/endpoints/authentication/js.h | Adds /*unused*/ comment and removes inline from constexpr function |
| include/ccf/endpoints/authentication/empty_auth.h | Adds [[maybe_unused]] attributes and [[nodiscard]] with reformatting |
| include/ccf/endpoints/authentication/cose_auth.h | Adds default initialization, changes parameters to pass-by-value with move, adds override keywords, adds [[nodiscard]] |
| include/ccf/endpoints/authentication/cert_auth.h | Moves helper function out of anonymous namespace, changes destructors to override, adds [[nodiscard]], removes virtual keywords |
| include/ccf/endpoints/authentication/all_of_auth.h | Adds parameter names, [[nodiscard]] attribute |
| src/node/gov/handlers/proposals.h | Adds error checking for set_bool() return value |
Co-authored-by: Copilot <[email protected]>
Follow-up to #7449.