Skip to content

Tidy src/http headers#7506

Merged
achamayou merged 2 commits intomainfrom
http_headers_tidy
Dec 4, 2025
Merged

Tidy src/http headers#7506
achamayou merged 2 commits intomainfrom
http_headers_tidy

Conversation

@achamayou
Copy link
Copy Markdown
Member

Follow up to #7493

@achamayou achamayou requested a review from a team as a code owner December 4, 2025 10:03
Copilot AI review requested due to automatic review settings December 4, 2025 10:03
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 performs comprehensive tidying and modernization of the HTTP-related headers in src/http/, following up on #7493 to apply clang-tidy improvements consistently across the HTTP subsystem.

  • Adds HTTP directory to clang-tidy's HeaderFilterRegex for comprehensive static analysis
  • Applies modern C++ best practices including [[nodiscard]] attributes, explicit destructors, and improved const correctness
  • Fixes a subtle bug where std::move() was incorrectly used on a const reference parameter

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.clang-tidy Adds http directory to HeaderFilterRegex for enforcing code quality checks
src/kv/kv_types.h Removes unused forward declaration for aft::Request
src/http/http_session.h Updates parameter naming conventions, removes unnecessary else block, adds proper move semantics
src/http/http_rpc_context.h Adds [[nodiscard]] attributes, removes redundant initializers, improves member initialization
src/http/http_proc.h Adds virtual destructors to base classes for proper polymorphic behavior
src/http/http_parser.h Improves type safety with explicit casts, adds destructors, specifies enum underlying types
src/http/http_jwt.h Specifies enum underlying type, adds member initialization
src/http/http_exceptions.h Adds [[nodiscard]] attribute to getter method
src/http/http_builder.h Adds [[nodiscard]] attributes, removes unnecessary else blocks, improves vector construction
src/http/http2_utils.h Converts C-style casts to explicit reinterpret_cast, removes unnecessary const qualifiers
src/http/http2_types.h Specifies enum underlying type, improves member initialization, adds [[nodiscard]] attributes
src/http/http2_session.h Fixes bug with std::move on const reference, updates parameter naming, removes unnecessary else
src/http/http2_parser.h Improves initialization, adds [[nodiscard]] attributes, uses type traits aliases
src/http/http2_callbacks.h Documents unused parameters with comments, fixes bitwise operation comparison
src/http/error_reporter.h Uses defaulted virtual destructor
src/http/curl.h Improves const correctness, adds safety checks, fixes pointer casting

@achamayou achamayou enabled auto-merge (squash) December 4, 2025 11:40
@achamayou achamayou merged commit 3d7df00 into main Dec 4, 2025
17 checks passed
@achamayou achamayou deleted the http_headers_tidy branch December 4, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants