Skip to content

Conversation

Dimi1010
Copy link
Collaborator

@Dimi1010 Dimi1010 commented Oct 9, 2025

Application of #1962 (comment)

Copy link

@Copilot 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 applies clang-format rules to add braces for multiline control blocks, improving code readability and consistency. The changes enforce the coding standard that any multiline control flow statements should have their bodies enclosed in braces.

  • Adds braces around single-line control blocks in if/else/while/for statements
  • Maintains code functionality while improving formatting consistency
  • Applies across multiple test and source files to establish uniform code style

Reviewed Changes

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

Show a summary per file
File Description
Tests/Pcap++Test/main.cpp Added braces for multiline if statements in configuration setup
Tests/Pcap++Test/Tests/*.cpp Added braces for control blocks in test files across various protocol implementations
Tests/Packet++Test/main.cpp Added braces for configuration if statements
Tests/Packet++Test/Utils/TestUtils.cpp Added braces for control flow statements in utility functions
Tests/Fuzzers/*.cpp Added braces for conditional statements in fuzzing test code
Pcap++/src/*.cpp Added braces for control blocks in networking device implementation files
Packet++/src/*.cpp Added braces for control blocks in packet parsing and protocol layer implementations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 74.48276% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.38%. Comparing base (722ace3) to head (0dd44a5).

Files with missing lines Patch % Lines
Packet++/src/SSLHandshake.cpp 33.33% 6 Missing ⚠️
Packet++/header/TLVData.h 33.33% 4 Missing ⚠️
Packet++/src/TextBasedProtocol.cpp 83.33% 4 Missing ⚠️
Pcap++/src/PcapFileDevice.cpp 20.00% 4 Missing ⚠️
Pcap++/src/PcapFilter.cpp 42.85% 4 Missing ⚠️
Packet++/src/IPv6Extensions.cpp 57.14% 3 Missing ⚠️
Packet++/src/IPv6Layer.cpp 62.50% 3 Missing ⚠️
Packet++/src/SingleCommandTextProtocol.cpp 70.00% 3 Missing ⚠️
Packet++/src/SipLayer.cpp 66.66% 3 Missing ⚠️
Packet++/src/TcpLayer.cpp 75.00% 3 Missing ⚠️
... and 24 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1990      +/-   ##
==========================================
- Coverage   83.43%   83.38%   -0.05%     
==========================================
  Files         311      311              
  Lines       54989    55273     +284     
  Branches    12084    12065      -19     
==========================================
+ Hits        45879    46091     +212     
- Misses       7845     8310     +465     
+ Partials     1265      872     -393     
Flag Coverage Δ
alpine320 75.92% <ø> (-0.01%) ⬇️
fedora42 75.86% <ø> (+0.01%) ⬆️
macos-14 81.55% <81.92%> (+<0.01%) ⬆️
macos-15 81.56% <81.92%> (+<0.01%) ⬆️
mingw32 70.64% <ø> (-0.01%) ⬇️
mingw64 70.60% <ø> (+0.11%) ⬆️
npcap ?
rhel94 75.87% <ø> (-0.03%) ⬇️
ubuntu2004 60.17% <ø> (+0.02%) ⬆️
ubuntu2004-zstd 60.25% <ø> (-0.02%) ⬇️
ubuntu2204 75.84% <ø> (-0.01%) ⬇️
ubuntu2204-icpx 60.87% <81.34%> (+0.24%) ⬆️
ubuntu2404 75.93% <ø> (+<0.01%) ⬆️
ubuntu2404-arm64 75.59% <ø> (-0.01%) ⬇️
unittest 83.38% <74.48%> (-0.05%) ⬇️
windows-2022 85.36% <65.25%> (+0.05%) ⬆️
windows-2025 85.39% <65.25%> (+0.01%) ⬆️
winpcap 85.39% <65.25%> (-0.17%) ⬇️
xdp 53.56% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant