-
Notifications
You must be signed in to change notification settings - Fork 913
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
Address all remaining clang-tidy errors #16956
Merged
Merged
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b2b125c
Address almost all issues
vyasr bdaa29d
More fixes
vyasr 0b47416
More fixes
vyasr 7f9faa9
More fixes
vyasr 4ed26cc
Config updates
vyasr 56d54c6
Allow the virtual calls in I/O destructors
vyasr 71c42a5
format
vyasr e9956f1
Make null iteration compatible with clang-tidy
vyasr 555f928
Avoid error in nanoarrow
vyasr ff5cfe0
Move CLI arguments to file
vyasr 97b0ffc
Patch out nanoarrow issues because they cannot easily be NOLINTed.
vyasr 9435902
Fix copyrights
vyasr a8860c3
Also remove key
vyasr 754be52
Address PR feedback
vyasr 174f7f8
Disable modernize-return-braced-init-list and revert all associated c…
vyasr 095ada9
Update comment
vyasr 130967d
Merge branch 'branch-24.12' into feat/clang_tidy_5
vyasr 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
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
38 changes: 38 additions & 0 deletions
38
cpp/cmake/thirdparty/patches/nanoarrow_clang_tidy_compliance.diff
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/src/nanoarrow/common/inline_buffer.h b/src/nanoarrow/common/inline_buffer.h | ||
index caa6be4..70ec8a2 100644 | ||
--- a/src/nanoarrow/common/inline_buffer.h | ||
+++ b/src/nanoarrow/common/inline_buffer.h | ||
@@ -347,7 +347,7 @@ static inline void _ArrowBitsUnpackInt32(const uint8_t word, int32_t* out) { | ||
} | ||
|
||
static inline void _ArrowBitmapPackInt8(const int8_t* values, uint8_t* out) { | ||
- *out = (uint8_t)(values[0] | ((values[1] + 0x1) & 0x2) | ((values[2] + 0x3) & 0x4) | | ||
+ *out = (uint8_t)(values[0] | ((values[1] + 0x1) & 0x2) | ((values[2] + 0x3) & 0x4) | // NOLINT | ||
((values[3] + 0x7) & 0x8) | ((values[4] + 0xf) & 0x10) | | ||
((values[5] + 0x1f) & 0x20) | ((values[6] + 0x3f) & 0x40) | | ||
((values[7] + 0x7f) & 0x80)); | ||
@@ -471,13 +471,13 @@ static inline void ArrowBitsSetTo(uint8_t* bits, int64_t start_offset, int64_t l | ||
// set bits within a single byte | ||
const uint8_t only_byte_mask = | ||
i_end % 8 == 0 ? first_byte_mask : (uint8_t)(first_byte_mask | last_byte_mask); | ||
- bits[bytes_begin] &= only_byte_mask; | ||
+ bits[bytes_begin] &= only_byte_mask; // NOLINT | ||
bits[bytes_begin] |= (uint8_t)(fill_byte & ~only_byte_mask); | ||
return; | ||
} | ||
|
||
// set/clear trailing bits of first byte | ||
- bits[bytes_begin] &= first_byte_mask; | ||
+ bits[bytes_begin] &= first_byte_mask; // NOLINT | ||
bits[bytes_begin] |= (uint8_t)(fill_byte & ~first_byte_mask); | ||
|
||
if (bytes_end - bytes_begin > 2) { | ||
@@ -637,7 +637,7 @@ static inline void ArrowBitmapAppendInt8Unsafe(struct ArrowBitmap* bitmap, | ||
n_remaining -= n_full_bytes * 8; | ||
if (n_remaining > 0) { | ||
// Zero out the last byte | ||
- *out_cursor = 0x00; | ||
+ *out_cursor = 0x00; // NOLINT | ||
for (int i = 0; i < n_remaining; i++) { | ||
ArrowBitSetTo(bitmap->buffer.data, out_i_cursor++, values_cursor[i]); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
{ | ||
"packages" : { | ||
"nanoarrow" : { | ||
"version" : "0.6.0.dev", | ||
"git_url" : "https://github.com/apache/arrow-nanoarrow.git", | ||
"git_tag" : "1e2664a70ec14907409cadcceb14d79b9670bcdb", | ||
"git_shallow" : false, | ||
"patches" : [ | ||
{ | ||
"file" : "${current_json_dir}/nanoarrow_clang_tidy_compliance.diff", | ||
"issue" : "https://github.com/apache/arrow-nanoarrow/issues/537", | ||
"fixed_in" : "" | ||
} | ||
] | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
ELI5: Why was this change required? Isn't the old version a valid equivalent?
Is it because of (the equivalent of) the Google Style Guide stating that
structs
need to be POD/passive objects?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.
No, this was necessary because the header file declares this object as a class instead of a struct. We could equivalently have changed the header to use struct instead, but the two should be aligned because under certain compilers (Windows) the results could be ABI-incompatible. See https://clang.llvm.org/docs/DiagnosticsReference.html#wmismatched-tags