Skip to content

Commit

Permalink
Add InsertNewlineAtEOF: true to .clang-format (#4681)
Browse files Browse the repository at this point in the history
This is a new option to always insert newlines when formatting C++
source files. This is new as of clang-format 16 which we always include.

---
TYPE: NO_HISTORY
DESC: Add InsertNewlineAtEOF: true to .clang-format
  • Loading branch information
davisp authored Jan 30, 2024
1 parent 6e17749 commit 1578755
Show file tree
Hide file tree
Showing 96 changed files with 96 additions and 95 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ IndentCaseLabels: true
IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertNewlineAtEOF: true
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
Expand Down
2 changes: 1 addition & 1 deletion examples/c_api/query_condition_sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,4 @@ int main() {
tiledb_ctx_free(&ctx);

return 0;
}
}
2 changes: 1 addition & 1 deletion examples/cpp_api/query_condition_sparse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,4 @@ int main() {
vfs.remove_dir(array_name);

return 0;
}
}
2 changes: 1 addition & 1 deletion experimental/test/compile_experimental_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@

int main() {
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
*/
TEST_CASE("BlockEdge: Trivial test", "[block_edge]") {
CHECK(true);
}
}
2 changes: 1 addition & 1 deletion experimental/tiledb/common/dag/execution/test/unit_duffs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
#ifndef TILEDB_UNIT_DUFFS_H
#define TILEDB_UNIT_DUFFS_H
#include <test/support/tdb_catch.h>
#endif // TILEDB_UNIT_DUFFS_H
#endif // TILEDB_UNIT_DUFFS_H
Original file line number Diff line number Diff line change
Expand Up @@ -1103,4 +1103,4 @@ TEMPLATE_TEST_CASE(

// Repeat one of the tests above but with stop token

#endif
#endif
2 changes: 1 addition & 1 deletion test/regression/targets/sc-18836.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ TEST_CASE(

if (vfs.is_dir(array_name))
vfs.remove_dir(array_name);
}
}
2 changes: 1 addition & 1 deletion test/src/cpp-integration-query-condition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2640,4 +2640,4 @@ TEST_CASE(
if (vfs.is_dir(array_name)) {
vfs.remove_dir(array_name);
}
}
}
2 changes: 1 addition & 1 deletion test/src/test-capi-consolidation-plan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ TEST_CASE_METHOD(

tiledb_consolidation_plan_free_json_str(&str);
tiledb_consolidation_plan_free(&consolidation_plan);
}
}
2 changes: 1 addition & 1 deletion test/src/test-cppapi-aggregates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2663,4 +2663,4 @@ TEST_CASE_METHOD(
CHECK_THROWS(
QueryExperimental::create_unary_aggregate<SumOperator>(query, "a1"));
CHECK_THROWS(default_channel.apply_aggregate("Something", operation));
}
}
2 changes: 1 addition & 1 deletion test/src/unit-capi-consolidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7243,4 +7243,4 @@ TEST_CASE_METHOD(
check_commits_dir_sparse(1, 0, 1);

remove_sparse_array();
}
}
2 changes: 1 addition & 1 deletion test/src/unit-capi-fragment_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2180,4 +2180,4 @@ TEST_CASE(
tiledb_vfs_free(&vfs);
tiledb_error_free(&error);
tiledb_config_free(&config);
}
}
2 changes: 1 addition & 1 deletion test/src/unit-capi-partial-attribute-write.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,4 @@ TEST_CASE_METHOD(
CHECK(dim2 == std::vector<uint64_t>({1, 2, 4, 3, 1, 2, 3, 4}));

remove_array();
}
}
2 changes: 1 addition & 1 deletion test/src/unit-cppapi-array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2203,4 +2203,4 @@ TEST_CASE(
}

CHECK(i > 0);
}
}
2 changes: 1 addition & 1 deletion test/src/unit-cppapi-datetimes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ TEST_CASE("C++ API: Datetime dimension", "[cppapi][datetime]") {

if (vfs.is_dir(array_name))
vfs.remove_dir(array_name);
}
}
2 changes: 1 addition & 1 deletion test/src/unit-cppapi-partial-attribute-write.cc
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,4 @@ TEST_CASE_METHOD(
CHECK(dim2 == std::vector<uint64_t>({0, 0, 0, 0, 0, 0, 0, 0}));

remove_array();
}
}
2 changes: 1 addition & 1 deletion test/src/unit-cppapi-schema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,4 @@ TEST_CASE(
CHECK_NOTHROW(tiledb::Dimension::create(
ctx, "d1", TILEDB_UINT64, domain, &tile_extent));
}
}
}
2 changes: 1 addition & 1 deletion test/src/unit-cppapi-time.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ TEST_CASE("C++ API: Time dimension", "[cppapi][time]") {
if (vfs.is_dir(array_name))
vfs.remove_dir(array_name);
}
}
}
2 changes: 1 addition & 1 deletion test/src/unit-cppapi-update-queries.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,4 @@ TEST_CASE_METHOD(
check_update_conditions({qc, qc2}, {uvs, uvs2}, 4, encrypt);

remove_sparse_array();
}
}
2 changes: 1 addition & 1 deletion test/src/unit-ctx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ TEST_CASE("C++ API: Test context tags", "[cppapi][ctx-tags]") {
REQUIRE_NOTHROW(ctx.set_tag("tag1", "value3"));
REQUIRE(sm->tags().size() == 4);
REQUIRE(sm->tags().at("tag1") == "value3");
}
}
2 changes: 1 addition & 1 deletion test/src/unit-dense-reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1422,4 +1422,4 @@ TEST_CASE_METHOD(
CHECK(!std::memcmp(c_data_b, data_r_b, c_data_b_size));
CHECK(offsets_r_b_size == c_offsets_b_size);
CHECK(!std::memcmp(c_offsets_b, offsets_r_b, c_offsets_b_size));
}
}
2 changes: 1 addition & 1 deletion test/src/unit-duplicates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -730,4 +730,4 @@ TEST_CASE_METHOD(
CHECK(rc == TILEDB_OK);
tiledb_array_free(&array);
tiledb_query_free(&query);
}
}
2 changes: 1 addition & 1 deletion test/src/unit-result-coords.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,4 @@ TEST_CASE_METHOD(
REQUIRE(rc2.advance_to_next_cell() == true);
REQUIRE(rc2.pos_ == 2);
REQUIRE(rc2.advance_to_next_cell() == false);
}
}
2 changes: 1 addition & 1 deletion test/src/unit-result-tile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -424,4 +424,4 @@ TEST_CASE_METHOD(
num_cells);

CHECK(memcmp(result_count.data(), exp_result_count.data(), num_cells) == 0);
}
}
2 changes: 1 addition & 1 deletion test/src/unit-sparse-global-order-reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1588,4 +1588,4 @@ TEST_CASE_METHOD(
CHECK(rc == TILEDB_OK);
tiledb_array_free(&array);
tiledb_query_free(&query);
}
}
2 changes: 1 addition & 1 deletion test/src/unit-tile-metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1652,4 +1652,4 @@ TEST_CASE_METHOD(
create_array();
write_fragment();
check_metadata();
}
}
2 changes: 1 addition & 1 deletion tiledb/api/c_api/config/config_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,4 @@ CAPI_INTERFACE(
tiledb_error_t** error) {
return api_entry_error<tiledb::api::tiledb_config_iter_done>(
error, config_iter, done);
}
}
2 changes: 1 addition & 1 deletion tiledb/api/c_api/domain/domain_api_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,4 @@ TILEDB_EXPORT int32_t tiledb_domain_dump(
}
#endif

#endif
#endif
2 changes: 1 addition & 1 deletion tiledb/api/c_api/domain/domain_api_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ inline void ensure_domain_is_valid(const tiledb_domain_handle_t* h) {
ensure_handle_is_valid(h);
}

#endif
#endif
2 changes: 1 addition & 1 deletion tiledb/api/c_api/vfs/vfs_api_experimental.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ TILEDB_EXPORT capi_return_t tiledb_vfs_ls_recursive(
}
#endif

#endif // TILEDB_VFS_API_EXPERIMENTAL_H
#endif // TILEDB_VFS_API_EXPERIMENTAL_H
2 changes: 1 addition & 1 deletion tiledb/api/c_api/vfs/vfs_api_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -660,4 +660,4 @@ TILEDB_EXPORT capi_return_t tiledb_vfs_touch(
}
#endif

#endif // TILEDB_CAPI_VFS_EXTERNAL_H
#endif // TILEDB_CAPI_VFS_EXTERNAL_H
2 changes: 1 addition & 1 deletion tiledb/api/c_api_support/argument_validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ inline void ensure_output_pointer_is_valid(void* p) {

} // namespace tiledb::api

#endif // TILEDB_CAPI_SUPPORT_ARGUMENT_VALIDATION_H
#endif // TILEDB_CAPI_SUPPORT_ARGUMENT_VALIDATION_H
2 changes: 1 addition & 1 deletion tiledb/api/c_api_support/c_api_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
#include "capi_function_override.h"
#endif

#endif // TILEDB_CAPI_SUPPORT_H
#endif // TILEDB_CAPI_SUPPORT_H
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ void ETVisitorStdException::item(const std::exception& e) noexcept {
}
}

} // namespace tiledb::api::detail
} // namespace tiledb::api::detail
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ int main() {
tiledb::api::detail::ETVisitorStdException v{};
x.visit(v);
return 1;
}
}
2 changes: 1 addition & 1 deletion tiledb/api/c_api_support/handle/handle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@

#include "handle.h"

namespace tiledb::api {} // namespace tiledb::api
namespace tiledb::api {} // namespace tiledb::api
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
* @section DESCRIPTION
*
* This file has definitions for `class StorageManagerStub`.
*/
*/
2 changes: 1 addition & 1 deletion tiledb/common/interval/interval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@

#include "interval.h"

namespace tiledb::common::detail {} // namespace tiledb::common::detail
namespace tiledb::common::detail {} // namespace tiledb::common::detail
2 changes: 1 addition & 1 deletion tiledb/common/random/random_label.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ std::string random_label() {
return ss.str();
}

} // namespace tiledb::common
} // namespace tiledb::common
2 changes: 1 addition & 1 deletion tiledb/common/stdx_string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ size_t common_prefix_size(
return size;
}

} // namespace tiledb::stdx::string
} // namespace tiledb::stdx::string
2 changes: 1 addition & 1 deletion tiledb/common/thread_pool/test/compile_thread_pool_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
int main() {
(void)sizeof(tiledb::common::ThreadPool);
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/common/types/test/compile_datum_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ int main() {
(void)sizeof(tiledb::common::UntypedDatumView);
(void)sizeof(tiledb::common::DynamicTypedDatumView);
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/platform/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ constexpr bool is_os_linux = true;
#endif // _WIN32

} // namespace tiledb::platform
#endif // TILEDB_PLATFORM_H
#endif // TILEDB_PLATFORM_H
2 changes: 1 addition & 1 deletion tiledb/sm/array/test/compile_array_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
int main() {
(void)sizeof(tiledb::sm::ArrayDirectory);
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/array_schema/test/compile_attribute_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
int main() {
(void)sizeof(tiledb::sm::Attribute);
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/array_schema/test/compile_dimension_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
int main() {
(void)sizeof(tiledb::sm::Dimension);
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/array_schema/test/compile_domain_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
int main() {
(void)sizeof(tiledb::sm::Domain);
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/array_schema/test/unit_dimension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,4 +438,4 @@ TEST_CASE("Dimension::oob format") {
error ==
"Coordinate -682.75 is out of domain bounds [-682.73999, 929.42999] on "
"dimension 'X'");
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/buffer/test/compile_buffer_list_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
int main() {
tiledb::sm::BufferList();
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/buffer/test/compile_buffer_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
int main() {
tiledb::sm::Buffer();
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/c_api/api_argument_validator.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,4 @@ inline int32_t sanity_check(
return save_error(ctx, _s); \
}()

#endif // TILEDB_CAPI_HELPERS_H
#endif // TILEDB_CAPI_HELPERS_H
2 changes: 1 addition & 1 deletion tiledb/sm/compressors/test/compile_compressors_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ int main() {
(void)sizeof(tiledb::sm::RLE);
(void)sizeof(tiledb::sm::ZStd);
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/compressors/test/unit_delta_compressor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ TEST_CASE("Test delta decompression of a vector", "[decompression][delta]") {

std::vector<int64_t> expected{0, 1, 1, 15, 3, 0, 2, 7, 1};
CHECK(uncompressed == expected);
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/compressors/test/unit_dict_compressor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,4 @@ TEST_CASE(
for (uint32_t i = 0; i < expected_offsets.size(); i++) {
CHECK(expected_offsets[i] == decompressed_offsets[i]);
}
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/config/test/compile_config_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
int main() {
(void)sizeof(tiledb::sm::Config);
return 0;
}
}
2 changes: 1 addition & 1 deletion tiledb/sm/cpp_api/vfs_experimental.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,4 @@ class VFSExperimental {
};
} // namespace tiledb

#endif // TILEDB_VFS_EXPERIMENTAL_H
#endif // TILEDB_VFS_EXPERIMENTAL_H
Loading

0 comments on commit 1578755

Please sign in to comment.