Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc9477d

Browse filesBrowse files
scotthartdevbww
authored andcommitted
ci: enable pedantic in clang-tidy builds (googleapis#15107)
1 parent e87d201 commit dc9477d
Copy full SHA for dc9477d

File tree

Expand file treeCollapse file tree

5 files changed

+19
-24
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+19
-24
lines changed

‎cmake/GoogleCloudCppCommonOptions.cmake

Copy file name to clipboardExpand all lines: cmake/GoogleCloudCppCommonOptions.cmake
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ check_cxx_compiler_flag(-Wno-sign-conversion
3434
check_cxx_compiler_flag(-Werror GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_WERROR)
3535
check_cxx_compiler_flag(-fclang-abi-compat=17
3636
GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_CLANG_ABI_COMPAT_17)
37+
check_cxx_compiler_flag(-pedantic GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_PEDANTIC)
3738

3839
#[=======================================================================[.rst:
3940
google_cloud_cpp_add_common_options(target [NO_WARNINGS])
@@ -109,4 +110,7 @@ function (google_cloud_cpp_add_common_options target)
109110
target_compile_options(${target}
110111
PRIVATE "-Wno-error=deprecated-declarations")
111112
endif ()
113+
if (CMAKE_CXX_CLANG_TIDY AND GOOGLE_CLOUD_CPP_COMPILER_SUPPORTS_PEDANTIC)
114+
target_compile_options(${target} PRIVATE "-pedantic")
115+
endif ()
112116
endfunction ()

‎generator/internal/pagination_test.cc

Copy file name to clipboardExpand all lines: generator/internal/pagination_test.cc
+12-21Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -683,27 +683,18 @@ TEST_P(BigQueryTestFixture, DetermineBigQueryPagination) {
683683
params.items_field_type_message_name);
684684
}
685685

686-
INSTANTIATE_TEST_SUITE_P(
687-
BigQueryTests, BigQueryTestFixture,
688-
ValuesIn<BigQueryTestParams>(
689-
{{.max_results_field_type_message_name = "google.protobuf.Int32Value",
690-
.items_field_name = "jobs",
691-
.items_field_type_message_name =
692-
"google.cloud.bigquery.v2.ListFormatJob"},
693-
{.max_results_field_type_message_name = "google.protobuf.UInt32Value",
694-
.items_field_name = "rows",
695-
.items_field_type_message_name = "google.protobuf.Struct"},
696-
{.max_results_field_type_message_name = "google.protobuf.UInt32Value",
697-
.items_field_name = "tables",
698-
.items_field_type_message_name =
699-
"google.cloud.bigquery.v2.ListFormatTable"},
700-
{.max_results_field_type_message_name = "google.protobuf.UInt32Value",
701-
.items_field_name = "datasets",
702-
.items_field_type_message_name =
703-
"google.cloud.bigquery.v2.ListFormatDataset"},
704-
{.max_results_field_type_message_name = "google.protobuf.UInt32Value",
705-
.items_field_name = "models",
706-
.items_field_type_message_name = "google.cloud.bigquery.v2.Model"}}));
686+
INSTANTIATE_TEST_SUITE_P(BigQueryTests, BigQueryTestFixture,
687+
ValuesIn<BigQueryTestParams>(
688+
{{"google.protobuf.Int32Value", "jobs",
689+
"google.cloud.bigquery.v2.ListFormatJob"},
690+
{"google.protobuf.UInt32Value", "rows",
691+
"google.protobuf.Struct"},
692+
{"google.protobuf.UInt32Value", "tables",
693+
"google.cloud.bigquery.v2.ListFormatTable"},
694+
{"google.protobuf.UInt32Value", "datasets",
695+
"google.cloud.bigquery.v2.ListFormatDataset"},
696+
{"google.protobuf.UInt32Value", "models",
697+
"google.cloud.bigquery.v2.Model"}}));
707698

708699
TEST(PaginationTest, PaginationBigQuerySpecialCaseSuccess) {
709700
FileDescriptorProto service_file;

‎google/cloud/internal/log_wrapper_test.cc

Copy file name to clipboardExpand all lines: google/cloud/internal/log_wrapper_test.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ using TestVariations = ::testing::Types<
6363
std::tuple<StatusOr<Response>, std::shared_ptr<grpc::ClientContext>> //
6464
>;
6565

66-
TYPED_TEST_SUITE(LogWrapperTest, TestVariations);
66+
TYPED_TEST_SUITE(LogWrapperTest, TestVariations, );
6767

6868
// These helper functions make it easier to write the tests.
6969
Request MakeRequest() {

‎google/cloud/internal/pagination_range_test.cc

Copy file name to clipboardExpand all lines: google/cloud/internal/pagination_range_test.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class MockRpcExplicit {
9292
template <typename T>
9393
class PaginationRangeTest : public testing::Test {};
9494
using ResponseTypes = ::testing::Types<ProtoResponse, StructResponse>;
95-
TYPED_TEST_SUITE(PaginationRangeTest, ResponseTypes);
95+
TYPED_TEST_SUITE(PaginationRangeTest, ResponseTypes, );
9696

9797
TYPED_TEST(PaginationRangeTest, SinglePageImplicit) {
9898
using ResponseType = TypeParam;

‎google/cloud/storage/internal/grpc/make_cord_test.cc

Copy file name to clipboardExpand all lines: google/cloud/storage/internal/grpc/make_cord_test.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ using TestVariations = ::testing::Types<
7070
std::string, std::vector<char>, std::vector<signed char>,
7171
std::vector<unsigned char>, std::vector<std::uint8_t> >;
7272

73-
TYPED_TEST_SUITE(MakeCordFromVector, TestVariations);
73+
TYPED_TEST_SUITE(MakeCordFromVector, TestVariations, );
7474

7575
TYPED_TEST(MakeCordFromVector, MakeCord) {
7676
using Collection = typename TestFixture::TestType;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.