-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address all remaining clang-tidy errors (#16956)
With this set of changes I get a clean run of clang-tidy (with one caveat that I'll explain in the follow-up PR to add clang-tidy to pre-commit/CI). Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Nghia Truong (https://github.com/ttnghia) - MithunR (https://github.com/mythrocks) - David Wendt (https://github.com/davidwendt) - Kyle Edwards (https://github.com/KyleFromNVIDIA) URL: #16956
- Loading branch information
Showing
51 changed files
with
344 additions
and
228 deletions.
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
Oops, something went wrong.