-
Notifications
You must be signed in to change notification settings - Fork 684
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
Run clang-format
for Examples and Tutorials
#1464
Merged
Merged
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
6990c13
Apply `clang-format` for the Examples and Tutorials
seladb 6a07fdc
Merge branch 'dev' into clang-format-for-examples
seladb f4226d5
Merge branch 'dev' into clang-format-for-examples
seladb 9e3a0d9
Change `UseTab` to `ForIndentation`
seladb 6c3a05b
Merge branch 'dev' into clang-format-for-examples
seladb cb62742
Ignore formatting for Arping
seladb fe1dfb0
Ignore formatting for DpdkExample-FilterTraffic
seladb 9773453
Merge branch 'dev' into clang-format-for-examples
seladb e5443d1
Merge branch 'dev' into clang-format-for-examples
seladb a96e653
Fix comment in `HttpStatsCollector.h`
seladb 1cf1743
Fix in `HttpAnalyzer/main.cpp`
seladb 841318c
Fix `PcapSearch/main.cpp`
seladb 8558933
Fix `PcapSplitter/main.cpp`
seladb 0dc6f1a
Fix `PfRingExample-FilterTraffic/main.cpp`
seladb 0089ca2
Fix `SSLAnalyzer/SSLStatsCollector.h`
seladb 7c75c9f
Fix `SSLAnalyzer/main.cpp`
seladb ead259c
Fix `TLSFingerprinting/main.cpp`
seladb 5c2b4c1
Fix `TcpReassembly/main.cpp`
seladb c1cbf34
Fix `Tutorial-PacketParsing/main.cpp`
seladb b757967
Fix `XdpExample-FilterTraffic/main.cpp`
seladb 63bab8d
Merge branch 'dev' into clang-format-for-examples
seladb d611013
Update clang-format pre-commit hook to go over Common++, Tests and Ex…
seladb adc538d
clang-format for LiveDeviceTests.cpp
seladb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@tigercosmos for some reason clang-format mixes tabs and spaces here, I have no idea why 🤷♂️
I tried different things but couldn't make it to work. Maybe you know?
It happens in other files also, like here:
PcapPlusPlus/Examples/IcmpFileTransfer/Common.cpp
Line 21 in 6990c13
But in others it doesn't happen:
PcapPlusPlus/Examples/DNSResolver/main.cpp
Line 19 in 6990c13
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.
Apparently in some of the files, changing the order of the arguments fixes the issue, this is very weird 😕
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.
@seladb whenever you think clang-format is stupid, you can turn off the format for that part.
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.
It's concerning that we can't rely on
clang-format
and need to go over the code ourselves. This kind of beats the purpose of a code formatter 😕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.
@seladb this kind of stuff rarely happens. We are formatting a bunch of code at once so there might be a few weird formatting. But overall, we will get the fruits after all formatting. :)