Skip to content
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

Clang-tidy fixes for Common++ #1639

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft

Conversation

egecetin
Copy link
Collaborator

@egecetin egecetin commented Nov 7, 2024

Fix various clang-tidy warnings

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 80.86957% with 22 lines in your changes missing coverage. Please review.

Project coverage is 83.16%. Comparing base (ab75534) to head (88413a0).

Files with missing lines Patch % Lines
Common++/src/IpUtils.cpp 0.00% 1 Missing and 2 partials ⚠️
Common++/src/SystemUtils.cpp 76.92% 3 Missing ⚠️
Common++/src/IpAddress.cpp 92.59% 2 Missing ⚠️
Examples/DNSResolver/main.cpp 0.00% 2 Missing ⚠️
Examples/DnsSpoofing/main.cpp 0.00% 2 Missing ⚠️
Pcap++/src/PcapLiveDevice.cpp 50.00% 2 Missing ⚠️
Pcap++/src/PcapRemoteDeviceList.cpp 0.00% 2 Missing ⚠️
Common++/src/GeneralUtils.cpp 75.00% 1 Missing ⚠️
Common++/src/OUILookup.cpp 87.50% 1 Missing ⚠️
Examples/Arping/main.cpp 50.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1639      +/-   ##
==========================================
+ Coverage   83.15%   83.16%   +0.01%     
==========================================
  Files         277      277              
  Lines       48193    48202       +9     
  Branches     9949     9922      -27     
==========================================
+ Hits        40074    40088      +14     
- Misses       7226     7265      +39     
+ Partials      893      849      -44     
Flag Coverage Δ
alpine320 75.16% <79.48%> (+<0.01%) ⬆️
fedora40 75.17% <78.94%> (-0.02%) ⬇️
macos-13 80.65% <81.90%> (-0.01%) ⬇️
macos-14 80.66% <81.90%> (+<0.01%) ⬆️
macos-15 80.63% <80.20%> (+<0.01%) ⬆️
mingw32 70.91% <76.92%> (-0.01%) ⬇️
mingw64 70.87% <76.92%> (-0.01%) ⬇️
npcap 85.33% <87.34%> (+0.01%) ⬆️
rhel94 75.06% <78.94%> (+<0.01%) ⬆️
ubuntu2004 58.62% <77.33%> (+<0.01%) ⬆️
ubuntu2004-zstd 58.74% <77.33%> (+0.01%) ⬆️
ubuntu2204 74.95% <78.94%> (-0.02%) ⬇️
ubuntu2204-icpx 61.53% <78.88%> (+0.14%) ⬆️
ubuntu2404 75.23% <79.22%> (+<0.01%) ⬆️
unittest 83.16% <80.86%> (+0.01%) ⬆️
windows-2019 85.36% <87.34%> (+0.02%) ⬆️
windows-2022 85.39% <90.66%> (+0.02%) ⬆️
winpcap 85.36% <87.34%> (+0.03%) ⬆️
xdp 50.54% <31.57%> (+<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.

@seladb
Copy link
Owner

seladb commented Nov 8, 2024

@egecetin please see this comment: #1637 (comment)

@egecetin
Copy link
Collaborator Author

egecetin commented Nov 8, 2024

@seladb Actually it is related with #1638 not this one 🙂. This PR for fixing of issues pointed by clang-tidy

@seladb
Copy link
Owner

seladb commented Nov 8, 2024

@seladb Actually it is related with #1638 not this one 🙂. This PR for fixing of issues pointed by clang-tidy

Oops sorry, I commented on the wrong PR... 🤦‍♂️

@egecetin egecetin changed the title Clang-tidy fixes Clang-tidy fixes for Common++ Nov 9, 2024
@@ -21,4 +21,5 @@ BreakBeforeBraces: Custom
BraceWrapping:
SplitEmptyFunction: false
AfterCaseLabel: true
QualifierAlignment: Left
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIP, const on the right... I found that easier to read because its consistent behavior with its usage in the middle...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me check the codebase again. If most of them left it is better to split PR for changing it. Anyway, lets invite more people so we can decide which is better @seladb @tigercosmos @clementperon.

Note: We still have plenty of time because there are lots of warnings even for Common++ so it will take some time to fix PR :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the left one though.

@egecetin egecetin requested a review from Copilot November 19, 2024 19:57

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 21 changed files in this pull request and generated no suggestions.

Files not reviewed (18)
  • Common++/header/GeneralUtils.h: Language not supported
  • Common++/header/IpAddress.h: Language not supported
  • Common++/header/IpUtils.h: Language not supported
  • Common++/header/LRUList.h: Language not supported
  • Common++/header/Logger.h: Language not supported
  • Common++/header/MacAddress.h: Language not supported
  • Common++/header/OUILookup.h: Language not supported
  • Common++/header/PointerVector.h: Language not supported
  • Common++/header/SystemUtils.h: Language not supported
  • Common++/header/TablePrinter.h: Language not supported
  • Common++/src/GeneralUtils.cpp: Language not supported
  • Common++/src/IpAddress.cpp: Language not supported
  • Common++/src/IpUtils.cpp: Language not supported
  • Common++/src/Logger.cpp: Language not supported
  • Common++/src/MacAddress.cpp: Language not supported
  • Common++/src/OUILookup.cpp: Language not supported
  • Common++/src/SystemUtils.cpp: Language not supported
  • Common++/src/TablePrinter.cpp: Language not supported
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.

4 participants