-
Notifications
You must be signed in to change notification settings - Fork 721
Added clang-format rule to insert braces for multiline control blocks. #1990
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
base: dev
Are you sure you want to change the base?
Conversation
…le` statements.
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 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.
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
# Conflicts: # Packet++/src/Packet.cpp
Application of #1962 (comment)