From 86f79e8ba6630cb8664d2f8bb20e7f1ac558f3a9 Mon Sep 17 00:00:00 2001 From: noahdietz Date: Mon, 23 Sep 2024 13:04:20 -0700 Subject: [PATCH 1/2] chore: fix improper usage of Errorf --- locations/descriptor_locations_test.go | 2 +- locations/field_locations_test.go | 8 ++++---- locations/file_locations_test.go | 4 ++-- locations/message_locations_test.go | 2 +- locations/method_locations_test.go | 10 +++++----- rules/aip0122/camel_case_uris_test.go | 2 +- rules/aip0122/embedded_resource_test.go | 4 ++-- rules/aip0122/name_suffix_test.go | 2 +- rules/aip0122/no_self_links_test.go | 2 +- rules/aip0122/resource_collection_identifiers_test.go | 2 +- rules/aip0122/resource_id_output_only_test.go | 2 +- rules/aip0122/resource_reference_type_test.go | 2 +- rules/aip0123/name_never_optional_test.go | 2 +- rules/aip0123/resource_annotation_test.go | 6 +++--- rules/aip0123/resource_definition_pattern_test.go | 2 +- rules/aip0123/resource_definition_variables_test.go | 2 +- .../aip0123/resource_name_components_alternate_test.go | 2 +- rules/aip0123/resource_pattern_plural_test.go | 4 ++-- rules/aip0123/resource_pattern_singular_test.go | 6 +++--- rules/aip0123/resource_pattern_test.go | 2 +- rules/aip0123/resource_variables_test.go | 2 +- rules/aip0124/reference_same_package_test.go | 6 +++--- rules/aip0126/unspecified_test.go | 4 ++-- rules/aip0126/upper_snake_values_test.go | 2 +- rules/aip0127/http_annotation_test.go | 2 +- rules/aip0127/http_template_pattern_test.go | 4 ++-- rules/aip0127/resource_name_extraction_test.go | 2 +- rules/aip0127/uri_leading_slash_test.go | 2 +- rules/aip0128/resource_annotations_field_test.go | 2 +- rules/aip0128/resource_reconciling_field_test.go | 2 +- rules/aip0131/method_signature_test.go | 2 +- rules/aip0131/request_message_name_test.go | 2 +- rules/aip0131/request_name_behavior_test.go | 2 +- rules/aip0131/request_name_reference_test.go | 4 ++-- rules/aip0131/request_required_fields_test.go | 2 +- rules/aip0131/request_unknown_fields_test.go | 2 +- rules/aip0131/synonyms_test.go | 2 +- rules/aip0132/method_signature_test.go | 4 ++-- rules/aip0132/request_message_name_test.go | 2 +- rules/aip0132/request_parent_behavior_test.go | 2 +- rules/aip0132/request_parent_field_test.go | 2 +- rules/aip0132/request_parent_reference_test.go | 4 ++-- rules/aip0132/request_parent_required_test.go | 4 ++-- rules/aip0132/request_parent_valid_reference_test.go | 2 +- rules/aip0132/request_required_fields_test.go | 2 +- rules/aip0132/request_unknown_fields_test.go | 2 +- rules/aip0132/response_unknown_fields_test.go | 2 +- rules/aip0133/method_signature_test.go | 4 ++-- rules/aip0133/request_id_field_test.go | 2 +- rules/aip0133/request_message_name_test.go | 2 +- rules/aip0133/request_parent_behavior_test.go | 2 +- rules/aip0133/request_parent_field_test.go | 2 +- rules/aip0133/request_parent_reference_test.go | 4 ++-- rules/aip0133/request_parent_required_test.go | 4 ++-- rules/aip0133/request_required_fields_test.go | 2 +- rules/aip0133/request_resource_behavior_test.go | 2 +- rules/aip0133/request_resource_field_test.go | 2 +- rules/aip0133/request_unknown_fields_test.go | 2 +- rules/aip0133/response_lro_test.go | 2 +- rules/aip0133/response_message_name_test.go | 2 +- rules/aip0133/synonyms_test.go | 2 +- rules/aip0134/method_signature_test.go | 2 +- rules/aip0134/request_mask_required_test.go | 2 +- rules/aip0134/request_message_name_test.go | 2 +- rules/aip0134/request_required_fields_test.go | 2 +- rules/aip0134/request_resource_field_test.go | 2 +- rules/aip0134/request_resource_required_test.go | 2 +- rules/aip0134/request_unknown_fields_test.go | 2 +- rules/aip0134/response_lro_test.go | 2 +- rules/aip0134/response_message_name_test.go | 2 +- rules/aip0134/synonyms_test.go | 2 +- rules/aip0134/update_mask_optional_behavior_test.go | 2 +- rules/aip0135/method_signature_test.go | 2 +- rules/aip0135/request_message_name_test.go | 2 +- rules/aip0135/request_name_behavior_test.go | 2 +- rules/aip0135/request_name_reference_test.go | 4 ++-- rules/aip0135/request_required_fields_test.go | 2 +- rules/aip0135/request_unknown_fields_test.go | 2 +- rules/aip0135/response_lro_test.go | 2 +- rules/aip0135/response_message_name_test.go | 2 +- .../aip0136/declarative_standard_methods_only_test.go | 2 +- rules/aip0136/http_body_test.go | 2 +- rules/aip0136/http_method_test.go | 2 +- rules/aip0136/http_name_variable_test.go | 2 +- rules/aip0136/http_parent_variable_test.go | 2 +- rules/aip0136/http_uri_suffix_test.go | 2 +- rules/aip0136/prepositions_test.go | 2 +- rules/aip0136/request_message_name_test.go | 2 +- rules/aip0136/verb_noun_test.go | 2 +- rules/aip0140/abbreviations_test.go | 2 +- rules/aip0140/base64_test.go | 2 +- rules/aip0140/lower_snake_test.go | 2 +- rules/aip0140/numbers_test.go | 2 +- rules/aip0140/prepositions_test.go | 2 +- rules/aip0140/reserved_words_test.go | 2 +- rules/aip0140/underscores_test.go | 2 +- rules/aip0140/uri_test.go | 2 +- rules/aip0141/count_suffix_test.go | 2 +- rules/aip0141/forbidden_types_test.go | 2 +- rules/aip0142/time_field_names_test.go | 2 +- rules/aip0142/time_field_type_test.go | 2 +- rules/aip0143/standardized_codes_test.go | 2 +- rules/aip0143/string_type_test.go | 2 +- rules/aip0144/request_message_name_test.go | 2 +- rules/aip0146/any_test.go | 2 +- rules/aip0148/human_names_test.go | 2 +- rules/aip0148/ip_address_format_test.go | 2 +- rules/aip0148/uid_format_test.go | 2 +- rules/aip0148/use_uid_test.go | 2 +- rules/aip0151/lro_metadata_reachable_test.go | 4 ++-- rules/aip0151/lro_metadata_type_test.go | 2 +- rules/aip0151/lro_response_type_test.go | 2 +- rules/aip0151/operation_info_test.go | 4 ++-- rules/aip0151/response_unary_test.go | 2 +- rules/aip0152/http_uri_suffix_test.go | 2 +- rules/aip0152/request_message_name_test.go | 2 +- rules/aip0152/request_name_behavior_test.go | 2 +- rules/aip0152/request_name_reference_test.go | 4 ++-- rules/aip0152/request_resource_suffix_test.go | 2 +- rules/aip0152/response_message_name_test.go | 2 +- rules/aip0154/declarative_friendly_required_test.go | 4 ++-- rules/aip0154/no_duplicate_etag_test.go | 2 +- rules/aip0155/request_id_format_test.go | 2 +- rules/aip0156/forbidden_methods_test.go | 2 +- rules/aip0158/response_next_page_token_field_test.go | 2 +- rules/aip0158/response_plural_first_field_test.go | 4 ++-- rules/aip0158/response_repeated_first_field_test.go | 2 +- rules/aip0158/response_unary_test.go | 2 +- rules/aip0159/hardcoded_hyphen_test.go | 2 +- rules/aip0162/commit_http_uri_suffix_test.go | 2 +- rules/aip0162/commit_request_message_name_test.go | 2 +- rules/aip0162/commit_request_name_field_test.go | 2 +- rules/aip0162/commit_request_name_reference_test.go | 2 +- rules/aip0162/commit_response_message_name_test.go | 4 ++-- rules/aip0162/delete_revision_http_uri_suffix_test.go | 2 +- .../delete_revision_request_message_name_test.go | 2 +- .../delete_revision_request_name_behavior_test.go | 2 +- .../aip0162/delete_revision_request_name_field_test.go | 2 +- .../delete_revision_request_name_reference_test.go | 2 +- rules/aip0162/rollback_http_uri_suffix_test.go | 2 +- rules/aip0162/rollback_request_message_name_test.go | 2 +- rules/aip0162/rollback_request_name_field_test.go | 2 +- rules/aip0162/rollback_request_name_reference_test.go | 2 +- .../aip0162/rollback_request_revision_id_field_test.go | 2 +- rules/aip0162/rollback_response_message_name_test.go | 4 ++-- rules/aip0162/tag_revision_http_uri_suffix_test.go | 2 +- .../aip0162/tag_revision_request_message_name_test.go | 2 +- .../aip0162/tag_revision_request_name_behavior_test.go | 2 +- rules/aip0162/tag_revision_request_name_field_test.go | 2 +- .../tag_revision_request_name_reference_test.go | 2 +- .../aip0162/tag_revision_request_tag_behavior_test.go | 2 +- rules/aip0162/tag_revision_request_tag_field_test.go | 2 +- .../aip0162/tag_revision_response_message_name_test.go | 4 ++-- rules/aip0163/declarative_friendly_required_test.go | 2 +- rules/aip0163/synonyms_test.go | 2 +- rules/aip0164/http_uri_suffix_test.go | 2 +- rules/aip0164/request_message_name_test.go | 2 +- rules/aip0164/request_name_behavior_test.go | 2 +- rules/aip0164/request_name_reference_test.go | 4 ++-- rules/aip0164/request_unknown_fields_test.go | 2 +- rules/aip0164/response_lro_test.go | 2 +- rules/aip0164/response_message_name_test.go | 2 +- rules/aip0165/http_uri_suffix_test.go | 2 +- rules/aip0165/request_filter_behavior_test.go | 2 +- rules/aip0165/request_filter_field_test.go | 2 +- rules/aip0165/request_force_field_test.go | 2 +- rules/aip0165/request_message_name_test.go | 2 +- rules/aip0165/request_parent_behavior_test.go | 2 +- rules/aip0165/request_parent_field_test.go | 2 +- rules/aip0165/request_parent_reference_test.go | 2 +- rules/aip0165/response_message_name_test.go | 2 +- rules/aip0165/response_purge_count_field_test.go | 2 +- rules/aip0165/response_purge_sample_field_test.go | 2 +- rules/aip0165/response_purge_sample_reference_test.go | 2 +- rules/aip0191/csharp_namespace_test.go | 2 +- rules/aip0191/file_layout_test.go | 4 ++-- rules/aip0191/file_option_consistency_test.go | 4 ++-- rules/aip0191/filenames_test.go | 2 +- rules/aip0191/java_multiple_files_test.go | 2 +- rules/aip0191/java_outer_classname_test.go | 2 +- rules/aip0191/java_package_test.go | 2 +- rules/aip0191/php_namespace_test.go | 2 +- rules/aip0191/proto_version_test.go | 2 +- rules/aip0191/ruby_package_test.go | 2 +- rules/aip0192/absolute_links_test.go | 2 +- rules/aip0192/no_html_test.go | 2 +- rules/aip0192/no_markdown_headings_test.go | 2 +- rules/aip0192/no_markdown_tables_test.go | 2 +- rules/aip0192/only_leading_comments_test.go | 2 +- rules/aip0192/trademarked_names_test.go | 2 +- rules/aip0203/field_behavior_required_test.go | 8 ++++---- rules/aip0214/resource_expiry_test.go | 2 +- rules/aip0214/ttl_type_test.go | 2 +- rules/aip0215/versioned_packages_test.go | 2 +- rules/aip0216/nesting_test.go | 4 ++-- rules/aip0216/state_field_output_only_test.go | 2 +- rules/aip0216/synonyms_test.go | 2 +- rules/aip0216/value_synonyms_test.go | 2 +- rules/aip0217/return_partial_success_type_test.go | 2 +- .../return_partial_success_with_unreachable_test.go | 2 +- rules/aip0217/synonyms_test.go | 2 +- rules/aip0217/unreachable_field_type_test.go | 2 +- rules/aip0231/http_uri_suffix_test.go | 2 +- rules/aip0231/plural_method_name_test.go | 2 +- rules/aip0231/request_message_name_test.go | 2 +- rules/aip0231/request_names_behavior_test.go | 2 +- rules/aip0231/request_names_field_test.go | 2 +- rules/aip0231/request_names_reference_test.go | 2 +- rules/aip0231/request_parent_field_test.go | 2 +- rules/aip0231/request_parent_reference_test.go | 2 +- rules/aip0231/request_unknown_fields_test.go | 2 +- rules/aip0231/response_message_name_test.go | 2 +- rules/aip0231/response_resource_field_test.go | 2 +- rules/aip0233/http_body_test.go | 2 +- rules/aip0233/http_method_test.go | 2 +- rules/aip0233/http_uri_suffix_test.go | 2 +- rules/aip0233/plural_method_name_test.go | 2 +- rules/aip0233/request_message_name_test.go | 2 +- rules/aip0233/request_parent_field_test.go | 2 +- rules/aip0233/request_parent_reference_test.go | 2 +- rules/aip0233/request_requests_behavior_test.go | 2 +- rules/aip0233/request_requests_field_test.go | 2 +- rules/aip0233/request_unknown_fields_test.go | 2 +- rules/aip0233/response_message_name_test.go | 4 ++-- rules/aip0233/response_resource_field_test.go | 2 +- rules/aip0234/http_body_test.go | 2 +- rules/aip0234/http_method_test.go | 2 +- rules/aip0234/http_uri_suffix_test.go | 2 +- rules/aip0234/plural_method_name_test.go | 2 +- rules/aip0234/request_message_name_test.go | 2 +- rules/aip0234/request_parent_field_test.go | 2 +- rules/aip0234/request_parent_reference_test.go | 2 +- rules/aip0234/request_requests_behavior_test.go | 2 +- rules/aip0234/request_requests_field_test.go | 2 +- rules/aip0234/request_unknown_fields_test.go | 2 +- rules/aip0234/response_message_name_test.go | 4 ++-- rules/aip0234/response_resource_field_test.go | 2 +- rules/aip0235/http_uri_suffix_test.go | 2 +- rules/aip0235/plural_method_name_test.go | 2 +- rules/aip0235/request_message_name_test.go | 2 +- rules/aip0235/request_names_behavior_test.go | 2 +- rules/aip0235/request_names_field_test.go | 2 +- rules/aip0235/request_names_reference_test.go | 2 +- rules/aip0235/request_parent_field_test.go | 2 +- rules/aip0235/request_parent_reference_test.go | 2 +- rules/aip0235/request_requests_behavior_test.go | 2 +- rules/aip0235/request_unknown_fields_test.go | 2 +- rules/aip0235/response_message_name_test.go | 2 +- rules/aip0235/response_resource_field_test.go | 2 +- rules/internal/utils/extension_test.go | 4 ++-- rules/internal/utils/http_test.go | 4 ++-- 251 files changed, 296 insertions(+), 296 deletions(-) diff --git a/locations/descriptor_locations_test.go b/locations/descriptor_locations_test.go index 7b4a4e78a..505e3c59c 100644 --- a/locations/descriptor_locations_test.go +++ b/locations/descriptor_locations_test.go @@ -41,7 +41,7 @@ func TestDescriptorName(t *testing.T) { for _, test := range tests { t.Run(test.testName, func(t *testing.T) { if diff := cmp.Diff(DescriptorName(test.d).Span, test.wantSpan); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/locations/field_locations_test.go b/locations/field_locations_test.go index 5bb7c7b79..c97af1242 100644 --- a/locations/field_locations_test.go +++ b/locations/field_locations_test.go @@ -42,7 +42,7 @@ func TestFieldLocations(t *testing.T) { t.Run(test.name, func(t *testing.T) { l := FieldType(test.field) if diff := cmp.Diff(l.GetSpan(), test.span); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -66,7 +66,7 @@ func TestFieldLabel(t *testing.T) { t.Run(test.name, func(t *testing.T) { l := FieldLabel(test.field) if diff := cmp.Diff(l.GetSpan(), test.span); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -84,7 +84,7 @@ func TestFieldResourceReference(t *testing.T) { loc := FieldResourceReference(f.GetMessageTypes()[0].GetFields()[0]) // resource_reference annotation location is roughly line 4, column 19. if diff := cmp.Diff(loc.GetSpan(), []int32{4, 19, 6, 3}); diff != "" { - t.Errorf(diff) + t.Error(diff) } } @@ -99,6 +99,6 @@ func TestFieldOption(t *testing.T) { `) loc := FieldOption(f.GetMessageTypes()[0].GetFields()[0], apb.E_ResourceReference) if diff := cmp.Diff(loc.GetSpan(), []int32{4, 19, 6, 3}); diff != "" { - t.Errorf(diff) + t.Error(diff) } } diff --git a/locations/file_locations_test.go b/locations/file_locations_test.go index 480295aa4..212354a53 100644 --- a/locations/file_locations_test.go +++ b/locations/file_locations_test.go @@ -103,7 +103,7 @@ func TestLocations(t *testing.T) { l = test.idxFx(f, test.idx) } if diff := cmp.Diff(l.Span, test.wantSpan); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -143,7 +143,7 @@ func TestMissingLocations(t *testing.T) { for _, test := range tests { t.Run(test.testName, func(t *testing.T) { if diff := cmp.Diff(test.fx(f).Span, []int32{0, 0, 0}); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/locations/message_locations_test.go b/locations/message_locations_test.go index a23e30c44..22ea52e3d 100644 --- a/locations/message_locations_test.go +++ b/locations/message_locations_test.go @@ -32,6 +32,6 @@ func TestMessageResource(t *testing.T) { `) loc := MessageResource(f.GetMessageTypes()[0]) if diff := cmp.Diff(loc.GetSpan(), []int32{4, 2, 7, 4}); diff != "" { - t.Errorf(diff) + t.Error(diff) } } diff --git a/locations/method_locations_test.go b/locations/method_locations_test.go index 7e670969e..1300d26db 100644 --- a/locations/method_locations_test.go +++ b/locations/method_locations_test.go @@ -31,7 +31,7 @@ func TestMethodRequestType(t *testing.T) { loc := MethodRequestType(f.GetServices()[0].GetMethods()[0]) // Three character span: line, start column, end column. if diff := cmp.Diff(loc.GetSpan(), []int32{3, 14, 28}); diff != "" { - t.Errorf(diff) + t.Error(diff) } } @@ -46,7 +46,7 @@ func TestMethodResponseType(t *testing.T) { loc := MethodResponseType(f.GetServices()[0].GetMethods()[0]) // Three character span: line, start column, end column. if diff := cmp.Diff(loc.GetSpan(), []int32{3, 39, 43}); diff != "" { - t.Errorf(diff) + t.Error(diff) } } @@ -66,7 +66,7 @@ func TestMethodHTTPRule(t *testing.T) { loc := MethodHTTPRule(f.GetServices()[0].GetMethods()[0]) // Four character span: start line, start column, end line, end column. if diff := cmp.Diff(loc.GetSpan(), []int32{5, 4, 7, 6}); diff != "" { - t.Errorf(diff) + t.Error(diff) } } @@ -86,7 +86,7 @@ func TestMethodOperationInfo(t *testing.T) { loc := MethodOperationInfo(f.GetServices()[0].GetMethods()[0]) // Four character span: start line, start column, end line, end column. if diff := cmp.Diff(loc.GetSpan(), []int32{5, 4, 8, 6}); diff != "" { - t.Errorf(diff) + t.Error(diff) } } @@ -113,7 +113,7 @@ func TestMethodSignature(t *testing.T) { loc := MethodSignature(f.GetServices()[0].GetMethods()[0], test.index) // Four character span: start line, start column, end line, end column. if diff := cmp.Diff(loc.GetSpan(), test.want); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0122/camel_case_uris_test.go b/rules/aip0122/camel_case_uris_test.go index feeea34d4..5fb37dbf0 100644 --- a/rules/aip0122/camel_case_uris_test.go +++ b/rules/aip0122/camel_case_uris_test.go @@ -53,7 +53,7 @@ func TestHttpUriField(t *testing.T) { method := file.GetServices()[0].GetMethods()[0] problems := httpURICase.Lint(file) if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0122/embedded_resource_test.go b/rules/aip0122/embedded_resource_test.go index d7b0e6e66..2d646688f 100644 --- a/rules/aip0122/embedded_resource_test.go +++ b/rules/aip0122/embedded_resource_test.go @@ -99,7 +99,7 @@ func TestEmbeddedResource(t *testing.T) { want[1].Descriptor = m.FindFieldByName("librarian") } if diff := want.Diff(embeddedResource.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -152,7 +152,7 @@ func TestEmbeddedResource_Revisions(t *testing.T) { `, test) field := f.FindMessage("BookRevision").FindFieldByName("snapshot") if diff := test.problems.SetDescriptor(field).Diff(embeddedResource.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0122/name_suffix_test.go b/rules/aip0122/name_suffix_test.go index 786f3af13..656eff7f6 100644 --- a/rules/aip0122/name_suffix_test.go +++ b/rules/aip0122/name_suffix_test.go @@ -42,7 +42,7 @@ func TestNameSuffix(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[1] if diff := test.problems.SetDescriptor(field).Diff(nameSuffix.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0122/no_self_links_test.go b/rules/aip0122/no_self_links_test.go index 722cc0c30..e0c01ccea 100644 --- a/rules/aip0122/no_self_links_test.go +++ b/rules/aip0122/no_self_links_test.go @@ -43,7 +43,7 @@ func TestNoSelfLinks(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[1] if diff := test.problems.SetDescriptor(field).Diff(noSelfLinks.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0122/resource_collection_identifiers_test.go b/rules/aip0122/resource_collection_identifiers_test.go index 9dc285129..3e5831195 100644 --- a/rules/aip0122/resource_collection_identifiers_test.go +++ b/rules/aip0122/resource_collection_identifiers_test.go @@ -45,7 +45,7 @@ func TestResourceCollectionIdentifiers(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourceCollectionIdentifiers.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0122/resource_id_output_only_test.go b/rules/aip0122/resource_id_output_only_test.go index a4c50fb00..a011699ac 100644 --- a/rules/aip0122/resource_id_output_only_test.go +++ b/rules/aip0122/resource_id_output_only_test.go @@ -48,7 +48,7 @@ func TestResourceIdOutputOnly(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[1] if diff := test.problems.SetDescriptor(field).Diff(resourceIdOutputOnly.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0122/resource_reference_type_test.go b/rules/aip0122/resource_reference_type_test.go index 6edf6f76a..dd85a3c3f 100644 --- a/rules/aip0122/resource_reference_type_test.go +++ b/rules/aip0122/resource_reference_type_test.go @@ -46,7 +46,7 @@ func TestResourceReferenceType(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(resourceReferenceType.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/name_never_optional_test.go b/rules/aip0123/name_never_optional_test.go index 221f533a0..edb341e0c 100644 --- a/rules/aip0123/name_never_optional_test.go +++ b/rules/aip0123/name_never_optional_test.go @@ -48,7 +48,7 @@ func TestNameNeverOptional(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(nameNeverOptional.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/resource_annotation_test.go b/rules/aip0123/resource_annotation_test.go index 09b9a420a..1367e345c 100644 --- a/rules/aip0123/resource_annotation_test.go +++ b/rules/aip0123/resource_annotation_test.go @@ -34,7 +34,7 @@ func TestResourceAnnotation(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(resourceAnnotation.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) @@ -48,7 +48,7 @@ func TestResourceAnnotation(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(resourceAnnotation.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) @@ -73,7 +73,7 @@ func TestResourceAnnotation(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourceAnnotation.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/resource_definition_pattern_test.go b/rules/aip0123/resource_definition_pattern_test.go index fa5069723..c9234c84c 100644 --- a/rules/aip0123/resource_definition_pattern_test.go +++ b/rules/aip0123/resource_definition_pattern_test.go @@ -44,7 +44,7 @@ func TestResourceDefinitionPattern(t *testing.T) { `, test) got := resourceDefinitionPatterns.Lint(f) if diff := test.problems.SetDescriptor(f).Diff(got); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/resource_definition_variables_test.go b/rules/aip0123/resource_definition_variables_test.go index 22b55b6b8..07416efd0 100644 --- a/rules/aip0123/resource_definition_variables_test.go +++ b/rules/aip0123/resource_definition_variables_test.go @@ -44,7 +44,7 @@ func TestResourceDefinitionVariables(t *testing.T) { `, test) got := resourceDefinitionVariables.Lint(f) if diff := test.problems.SetDescriptor(f).Diff(got); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/resource_name_components_alternate_test.go b/rules/aip0123/resource_name_components_alternate_test.go index afa6bcc0b..bbf8528a3 100644 --- a/rules/aip0123/resource_name_components_alternate_test.go +++ b/rules/aip0123/resource_name_components_alternate_test.go @@ -44,7 +44,7 @@ func TestResourceNameComponentsAlternate(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourceNameComponentsAlternate.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/resource_pattern_plural_test.go b/rules/aip0123/resource_pattern_plural_test.go index 3f6695359..af431fc28 100644 --- a/rules/aip0123/resource_pattern_plural_test.go +++ b/rules/aip0123/resource_pattern_plural_test.go @@ -46,7 +46,7 @@ func TestResourcePatternPluralSimple(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourcePatternPlural.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -101,7 +101,7 @@ func TestResourcePatternPluralNested(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourcePatternPlural.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/resource_pattern_singular_test.go b/rules/aip0123/resource_pattern_singular_test.go index 6a6fb6bb4..70e6a23d2 100644 --- a/rules/aip0123/resource_pattern_singular_test.go +++ b/rules/aip0123/resource_pattern_singular_test.go @@ -48,7 +48,7 @@ func TestResourcePatternSingularSimple(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourcePatternSingular.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -83,7 +83,7 @@ func TestResourcePatternSingularMultiWord(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourcePatternSingular.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -156,7 +156,7 @@ func TestResourcePatternSingularNested(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourcePatternSingular.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/resource_pattern_test.go b/rules/aip0123/resource_pattern_test.go index 276de85ee..747c90344 100644 --- a/rules/aip0123/resource_pattern_test.go +++ b/rules/aip0123/resource_pattern_test.go @@ -50,7 +50,7 @@ func TestResourcePattern(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourcePattern.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0123/resource_variables_test.go b/rules/aip0123/resource_variables_test.go index ef92dc78a..a5321a444 100644 --- a/rules/aip0123/resource_variables_test.go +++ b/rules/aip0123/resource_variables_test.go @@ -47,7 +47,7 @@ func TestResourceVariables(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(resourceVariables.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0124/reference_same_package_test.go b/rules/aip0124/reference_same_package_test.go index 7f35754fa..ebc38245d 100644 --- a/rules/aip0124/reference_same_package_test.go +++ b/rules/aip0124/reference_same_package_test.go @@ -58,7 +58,7 @@ func TestReferenceSamePackage(t *testing.T) { file := files["leaf.proto"] field := file.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(referenceSamePackage.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) @@ -83,7 +83,7 @@ func TestReferenceSamePackage(t *testing.T) { file := files["leaf.proto"] field := file.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(referenceSamePackage.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) @@ -111,7 +111,7 @@ func TestReferenceSamePackage(t *testing.T) { file := files["leaf.proto"] field := file.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(referenceSamePackage.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) }) diff --git a/rules/aip0126/unspecified_test.go b/rules/aip0126/unspecified_test.go index 9e01e877f..8cbc92a89 100644 --- a/rules/aip0126/unspecified_test.go +++ b/rules/aip0126/unspecified_test.go @@ -48,7 +48,7 @@ func TestUnspecified(t *testing.T) { // Run the lint rule and establish we get the correct problems. problems := unspecified.Lint(f) if diff := test.problems.SetDescriptor(f.GetEnumTypes()[0].GetValues()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -67,7 +67,7 @@ func TestUnspecified(t *testing.T) { // Run the lint rule and establish we get the correct problems. problems := unspecified.Lint(f) if diff := test.problems.SetDescriptor(f.GetEnumTypes()[0].GetValues()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0126/upper_snake_values_test.go b/rules/aip0126/upper_snake_values_test.go index a2f3e532f..ef1226265 100644 --- a/rules/aip0126/upper_snake_values_test.go +++ b/rules/aip0126/upper_snake_values_test.go @@ -53,7 +53,7 @@ func TestUpperSnake(t *testing.T) { // Run the lint rule, and establish that we got the correct problems. problems := enumValueUpperSnakeCase.Lint(enum.GetFile()) if diff := test.problems.Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0127/http_annotation_test.go b/rules/aip0127/http_annotation_test.go index f49f4e329..88d4877d0 100644 --- a/rules/aip0127/http_annotation_test.go +++ b/rules/aip0127/http_annotation_test.go @@ -55,7 +55,7 @@ func TestHasAnnotation(t *testing.T) { `, "{{.Annotation}}", test.annotation), test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(hasAnnotation.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0127/http_template_pattern_test.go b/rules/aip0127/http_template_pattern_test.go index 3e11efa53..f29acc85c 100644 --- a/rules/aip0127/http_template_pattern_test.go +++ b/rules/aip0127/http_template_pattern_test.go @@ -79,7 +79,7 @@ func TestHttpTemplatePattern_PatternMatching(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(httpTemplatePattern.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -123,7 +123,7 @@ func TestHttpTemplatePattern_MultiplePatterns(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(httpTemplatePattern.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0127/resource_name_extraction_test.go b/rules/aip0127/resource_name_extraction_test.go index 8ccf40670..78db44ab4 100644 --- a/rules/aip0127/resource_name_extraction_test.go +++ b/rules/aip0127/resource_name_extraction_test.go @@ -47,7 +47,7 @@ func TestResourceNameExtraction(t *testing.T) { method := f.GetServices()[0].GetMethods()[0] problems := resourceNameExtraction.Lint(f) if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0127/uri_leading_slash_test.go b/rules/aip0127/uri_leading_slash_test.go index 42c9735e4..9dffd4f1f 100644 --- a/rules/aip0127/uri_leading_slash_test.go +++ b/rules/aip0127/uri_leading_slash_test.go @@ -44,7 +44,7 @@ func TestURILeadingSlash(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(leadingSlash.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0128/resource_annotations_field_test.go b/rules/aip0128/resource_annotations_field_test.go index f9b72a08c..af8331664 100644 --- a/rules/aip0128/resource_annotations_field_test.go +++ b/rules/aip0128/resource_annotations_field_test.go @@ -53,7 +53,7 @@ func TestResourceAnnotationsField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[1] } if diff := test.problems.SetDescriptor(d).Diff(resourceAnnotationsField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0128/resource_reconciling_field_test.go b/rules/aip0128/resource_reconciling_field_test.go index 5f3832276..4ab34ffa5 100644 --- a/rules/aip0128/resource_reconciling_field_test.go +++ b/rules/aip0128/resource_reconciling_field_test.go @@ -54,7 +54,7 @@ func TestResourceReconcilingField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[1] } if diff := test.problems.SetDescriptor(d).Diff(resourceReconcilingField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0131/method_signature_test.go b/rules/aip0131/method_signature_test.go index b6566870e..cfee77762 100644 --- a/rules/aip0131/method_signature_test.go +++ b/rules/aip0131/method_signature_test.go @@ -50,7 +50,7 @@ func TestMethodSignature(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(methodSignature.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0131/request_message_name_test.go b/rules/aip0131/request_message_name_test.go index 5fd568b1c..98efd7653 100644 --- a/rules/aip0131/request_message_name_test.go +++ b/rules/aip0131/request_message_name_test.go @@ -48,7 +48,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0131/request_name_behavior_test.go b/rules/aip0131/request_name_behavior_test.go index 7c453a65d..0d294b4bb 100644 --- a/rules/aip0131/request_name_behavior_test.go +++ b/rules/aip0131/request_name_behavior_test.go @@ -40,7 +40,7 @@ func TestRequestNameBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNameBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0131/request_name_reference_test.go b/rules/aip0131/request_name_reference_test.go index bf617e8f9..8aea2d81f 100644 --- a/rules/aip0131/request_name_reference_test.go +++ b/rules/aip0131/request_name_reference_test.go @@ -31,7 +31,7 @@ func TestRequestNameReference(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(requestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) t.Run("Absent", func(t *testing.T) { @@ -52,7 +52,7 @@ func TestRequestNameReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0131/request_required_fields_test.go b/rules/aip0131/request_required_fields_test.go index c606d1ef3..f3f2a0eab 100644 --- a/rules/aip0131/request_required_fields_test.go +++ b/rules/aip0131/request_required_fields_test.go @@ -97,7 +97,7 @@ func TestRequiredFieldTests(t *testing.T) { dbr = f.FindMessage("GetBookRequest").FindFieldByName(test.problematicFieldName) } if diff := test.problems.SetDescriptor(dbr).Diff(requestRequiredFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0131/request_unknown_fields_test.go b/rules/aip0131/request_unknown_fields_test.go index 15eb739d0..cb8769941 100644 --- a/rules/aip0131/request_unknown_fields_test.go +++ b/rules/aip0131/request_unknown_fields_test.go @@ -64,7 +64,7 @@ func TestUnknownFields(t *testing.T) { wantProblems := test.problems.SetDescriptor(message.FindFieldByName(test.fieldName)) gotProblems := unknownFields.Lint(message.GetFile()) if diff := wantProblems.Diff(gotProblems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0131/synonyms_test.go b/rules/aip0131/synonyms_test.go index cdee5da28..1404dfb64 100644 --- a/rules/aip0131/synonyms_test.go +++ b/rules/aip0131/synonyms_test.go @@ -42,7 +42,7 @@ func TestSynonyms(t *testing.T) { `, test) m := file.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(synonyms.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0132/method_signature_test.go b/rules/aip0132/method_signature_test.go index aa2f5677b..a410e453b 100644 --- a/rules/aip0132/method_signature_test.go +++ b/rules/aip0132/method_signature_test.go @@ -52,7 +52,7 @@ func TestMethodSignature(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(methodSignature.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -68,7 +68,7 @@ func TestMethodSignature(t *testing.T) { message Book {} `) if diff := (testutils.Problems{}).Diff(methodSignature.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0132/request_message_name_test.go b/rules/aip0132/request_message_name_test.go index 453053d29..ba6730017 100644 --- a/rules/aip0132/request_message_name_test.go +++ b/rules/aip0132/request_message_name_test.go @@ -45,7 +45,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0132/request_parent_behavior_test.go b/rules/aip0132/request_parent_behavior_test.go index 2fed637e3..8e2a0a7bf 100644 --- a/rules/aip0132/request_parent_behavior_test.go +++ b/rules/aip0132/request_parent_behavior_test.go @@ -40,7 +40,7 @@ func TestRequestParentBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0132/request_parent_field_test.go b/rules/aip0132/request_parent_field_test.go index 5b6975817..e2af61a34 100644 --- a/rules/aip0132/request_parent_field_test.go +++ b/rules/aip0132/request_parent_field_test.go @@ -51,7 +51,7 @@ func TestRequestParentField(t *testing.T) { problems := requestParentField.Lint(f) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0132/request_parent_reference_test.go b/rules/aip0132/request_parent_reference_test.go index 24a82d20d..8e882cd8a 100644 --- a/rules/aip0132/request_parent_reference_test.go +++ b/rules/aip0132/request_parent_reference_test.go @@ -31,7 +31,7 @@ func TestRequestParentReference(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) t.Run("Absent", func(t *testing.T) { @@ -52,7 +52,7 @@ func TestRequestParentReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0132/request_parent_required_test.go b/rules/aip0132/request_parent_required_test.go index 254f197c4..ee630985c 100644 --- a/rules/aip0132/request_parent_required_test.go +++ b/rules/aip0132/request_parent_required_test.go @@ -28,7 +28,7 @@ func TestRequestParentRequired(t *testing.T) { `, test) problems := requestParentRequired.Lint(f) if diff := test.problems.SetDescriptor(f.GetMessageTypes()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -59,7 +59,7 @@ func TestRequestParentRequired(t *testing.T) { `, test) problems := requestParentRequired.Lint(f) if diff := (testutils.Problems{}).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0132/request_parent_valid_reference_test.go b/rules/aip0132/request_parent_valid_reference_test.go index 4ed6dd32a..af7e54055 100644 --- a/rules/aip0132/request_parent_valid_reference_test.go +++ b/rules/aip0132/request_parent_valid_reference_test.go @@ -53,7 +53,7 @@ func TestRequestParentValidReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentValidReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0132/request_required_fields_test.go b/rules/aip0132/request_required_fields_test.go index db52d1371..156062b57 100644 --- a/rules/aip0132/request_required_fields_test.go +++ b/rules/aip0132/request_required_fields_test.go @@ -101,7 +101,7 @@ func TestRequiredFieldTests(t *testing.T) { dbr = f.FindMessage("ListBooksRequest").FindFieldByName(test.problematicFieldName) } if diff := test.problems.SetDescriptor(dbr).Diff(requestRequiredFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0132/request_unknown_fields_test.go b/rules/aip0132/request_unknown_fields_test.go index a2eead277..b302fb41f 100644 --- a/rules/aip0132/request_unknown_fields_test.go +++ b/rules/aip0132/request_unknown_fields_test.go @@ -70,7 +70,7 @@ func TestUnknownFields(t *testing.T) { // number of problems. problems := unknownFields.Lint(message.GetFile()) if diff := test.problems.SetDescriptor(message.GetFields()[1]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0132/response_unknown_fields_test.go b/rules/aip0132/response_unknown_fields_test.go index 6ec76f75d..73687623d 100644 --- a/rules/aip0132/response_unknown_fields_test.go +++ b/rules/aip0132/response_unknown_fields_test.go @@ -44,7 +44,7 @@ func TestResponseUnknownFields(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[2] if diff := test.problems.SetDescriptor(field).Diff(responseUnknownFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/method_signature_test.go b/rules/aip0133/method_signature_test.go index 0dd475cea..d5f506e98 100644 --- a/rules/aip0133/method_signature_test.go +++ b/rules/aip0133/method_signature_test.go @@ -79,7 +79,7 @@ func TestMethodSignature(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(methodSignature.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -106,7 +106,7 @@ func TestMethodSignature(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(methodSignature.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_id_field_test.go b/rules/aip0133/request_id_field_test.go index a981108bf..0a1645e7f 100644 --- a/rules/aip0133/request_id_field_test.go +++ b/rules/aip0133/request_id_field_test.go @@ -55,7 +55,7 @@ func TestRequestIDField(t *testing.T) { `, test) m := f.FindMessage("CreateBookRequest") if diff := test.problems.SetDescriptor(m).Diff(requestIDField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_message_name_test.go b/rules/aip0133/request_message_name_test.go index 0b8c553f9..3523eb936 100644 --- a/rules/aip0133/request_message_name_test.go +++ b/rules/aip0133/request_message_name_test.go @@ -53,7 +53,7 @@ func TestInputName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(inputName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_parent_behavior_test.go b/rules/aip0133/request_parent_behavior_test.go index b7a77ff3b..e73cc4852 100644 --- a/rules/aip0133/request_parent_behavior_test.go +++ b/rules/aip0133/request_parent_behavior_test.go @@ -40,7 +40,7 @@ func TestRequestParentBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_parent_field_test.go b/rules/aip0133/request_parent_field_test.go index 0c08f1e99..1f717547e 100644 --- a/rules/aip0133/request_parent_field_test.go +++ b/rules/aip0133/request_parent_field_test.go @@ -47,7 +47,7 @@ func TestRequestParentField(t *testing.T) { problems := requestParentField.Lint(f) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_parent_reference_test.go b/rules/aip0133/request_parent_reference_test.go index e1979c120..29d4575d3 100644 --- a/rules/aip0133/request_parent_reference_test.go +++ b/rules/aip0133/request_parent_reference_test.go @@ -31,7 +31,7 @@ func TestRequestParentReference(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) t.Run("Absent", func(t *testing.T) { @@ -52,7 +52,7 @@ func TestRequestParentReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_parent_required_test.go b/rules/aip0133/request_parent_required_test.go index df31b45bc..c7d0ecbfe 100644 --- a/rules/aip0133/request_parent_required_test.go +++ b/rules/aip0133/request_parent_required_test.go @@ -31,7 +31,7 @@ func TestRequestParentFieldRequired(t *testing.T) { problems := requestParentRequired.Lint(f) message := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(message).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -53,7 +53,7 @@ func TestRequestParentFieldRequired(t *testing.T) { `) problems := requestParentRequired.Lint(f) if diff := (testutils.Problems{}).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_required_fields_test.go b/rules/aip0133/request_required_fields_test.go index 2fe1ffc85..36b6c0aef 100644 --- a/rules/aip0133/request_required_fields_test.go +++ b/rules/aip0133/request_required_fields_test.go @@ -125,7 +125,7 @@ func TestRequiredFieldTests(t *testing.T) { dbr = f.FindMessage("CreateBookShelfRequest").FindFieldByName(test.problematicFieldName) } if diff := test.problems.SetDescriptor(dbr).Diff(requestRequiredFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_resource_behavior_test.go b/rules/aip0133/request_resource_behavior_test.go index 402325c56..695af2b9b 100644 --- a/rules/aip0133/request_resource_behavior_test.go +++ b/rules/aip0133/request_resource_behavior_test.go @@ -43,7 +43,7 @@ func TestRequestResourceBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestResourceBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_resource_field_test.go b/rules/aip0133/request_resource_field_test.go index 9b47681e4..722240a02 100644 --- a/rules/aip0133/request_resource_field_test.go +++ b/rules/aip0133/request_resource_field_test.go @@ -81,7 +81,7 @@ func TestResourceField(t *testing.T) { // Run the lint rule, and establish that it returns the correct problems. problems := resourceField.Lint(message.GetFile()) if diff := test.problems.SetDescriptor(d).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/request_unknown_fields_test.go b/rules/aip0133/request_unknown_fields_test.go index 69f05a13d..56393733e 100644 --- a/rules/aip0133/request_unknown_fields_test.go +++ b/rules/aip0133/request_unknown_fields_test.go @@ -125,7 +125,7 @@ func TestUnknownFields(t *testing.T) { // Run the lint rule, and establish that it returns the correct problems. problems := unknownFields.Lint(message.GetFile()) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/response_lro_test.go b/rules/aip0133/response_lro_test.go index fc6f984af..747f98bed 100644 --- a/rules/aip0133/response_lro_test.go +++ b/rules/aip0133/response_lro_test.go @@ -53,7 +53,7 @@ func TestResponseLRO(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(responseLRO.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/response_message_name_test.go b/rules/aip0133/response_message_name_test.go index c9d39eabc..f2ee40167 100644 --- a/rules/aip0133/response_message_name_test.go +++ b/rules/aip0133/response_message_name_test.go @@ -63,7 +63,7 @@ func TestOutputMessageName(t *testing.T) { problems := outputName.Lint(file) method := file.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0133/synonyms_test.go b/rules/aip0133/synonyms_test.go index f5d65f16a..adddcee66 100644 --- a/rules/aip0133/synonyms_test.go +++ b/rules/aip0133/synonyms_test.go @@ -41,7 +41,7 @@ func TestSynonyms(t *testing.T) { `, test) m := file.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(synonyms.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/method_signature_test.go b/rules/aip0134/method_signature_test.go index 19c744dbd..d2f7710c2 100644 --- a/rules/aip0134/method_signature_test.go +++ b/rules/aip0134/method_signature_test.go @@ -50,7 +50,7 @@ func TestMethodSignature(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(methodSignature.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/request_mask_required_test.go b/rules/aip0134/request_mask_required_test.go index e4e5995d0..e06670978 100644 --- a/rules/aip0134/request_mask_required_test.go +++ b/rules/aip0134/request_mask_required_test.go @@ -42,7 +42,7 @@ func TestRequestMaskFieldRequired(t *testing.T) { message := file.GetMessageTypes()[0] problems := requestMaskRequired.Lint(file) if diff := test.problems.SetDescriptor(message).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/request_message_name_test.go b/rules/aip0134/request_message_name_test.go index 640270926..bbd096826 100644 --- a/rules/aip0134/request_message_name_test.go +++ b/rules/aip0134/request_message_name_test.go @@ -47,7 +47,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/request_required_fields_test.go b/rules/aip0134/request_required_fields_test.go index f66cc343b..1eccdf153 100644 --- a/rules/aip0134/request_required_fields_test.go +++ b/rules/aip0134/request_required_fields_test.go @@ -115,7 +115,7 @@ func TestRequiredFieldTests(t *testing.T) { dbr = f.FindMessage("UpdateBookShelfRequest").FindFieldByName(test.problematicFieldName) } if diff := test.problems.SetDescriptor(dbr).Diff(requestRequiredFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/request_resource_field_test.go b/rules/aip0134/request_resource_field_test.go index 00c68e18e..f258ce519 100644 --- a/rules/aip0134/request_resource_field_test.go +++ b/rules/aip0134/request_resource_field_test.go @@ -51,7 +51,7 @@ func TestResourceField(t *testing.T) { // Run the lint rule, and establish that it returns the correct problems. problems := requestResourceField.Lint(file) if diff := test.problems.SetDescriptor(field).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/request_resource_required_test.go b/rules/aip0134/request_resource_required_test.go index c93292475..7c631d1a5 100644 --- a/rules/aip0134/request_resource_required_test.go +++ b/rules/aip0134/request_resource_required_test.go @@ -33,7 +33,7 @@ func TestRequestResourceFieldRequired(t *testing.T) { message := file.GetMessageTypes()[0] problems := requestResourceRequired.Lint(file) if diff := test.problems.SetDescriptor(message).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/request_unknown_fields_test.go b/rules/aip0134/request_unknown_fields_test.go index 98aa6be74..5864187b8 100644 --- a/rules/aip0134/request_unknown_fields_test.go +++ b/rules/aip0134/request_unknown_fields_test.go @@ -82,7 +82,7 @@ func TestUnknownFields(t *testing.T) { wantProblems := test.problems.SetDescriptor(message.FindFieldByName(test.fieldName)) gotProblems := unknownFields.Lint(message.GetFile()) if diff := wantProblems.Diff(gotProblems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/response_lro_test.go b/rules/aip0134/response_lro_test.go index b8e17bb3a..9851d74c9 100644 --- a/rules/aip0134/response_lro_test.go +++ b/rules/aip0134/response_lro_test.go @@ -53,7 +53,7 @@ func TestResponseLRO(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(responseLRO.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/response_message_name_test.go b/rules/aip0134/response_message_name_test.go index 141ba8be9..cc6fa7be8 100644 --- a/rules/aip0134/response_message_name_test.go +++ b/rules/aip0134/response_message_name_test.go @@ -63,7 +63,7 @@ func TestResponseMessageName(t *testing.T) { problems := responseMessageName.Lint(file) method := file.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/synonyms_test.go b/rules/aip0134/synonyms_test.go index 115561f34..08732e4d1 100644 --- a/rules/aip0134/synonyms_test.go +++ b/rules/aip0134/synonyms_test.go @@ -42,7 +42,7 @@ func TestSynonyms(t *testing.T) { `, test) m := file.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(synonyms.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0134/update_mask_optional_behavior_test.go b/rules/aip0134/update_mask_optional_behavior_test.go index 845412236..f64f85b67 100644 --- a/rules/aip0134/update_mask_optional_behavior_test.go +++ b/rules/aip0134/update_mask_optional_behavior_test.go @@ -44,7 +44,7 @@ func TestUpdateMaskOptionalBehavior(t *testing.T) { field := file.GetMessageTypes()[0].FindFieldByName("update_mask") problems := updateMaskOptionalBehavior.Lint(file) if diff := test.problems.SetDescriptor(field).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0135/method_signature_test.go b/rules/aip0135/method_signature_test.go index 297c9cc62..d7c3c0287 100644 --- a/rules/aip0135/method_signature_test.go +++ b/rules/aip0135/method_signature_test.go @@ -60,7 +60,7 @@ func TestMethodSignature(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(methodSignature.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0135/request_message_name_test.go b/rules/aip0135/request_message_name_test.go index e72990d47..e54bcf49d 100644 --- a/rules/aip0135/request_message_name_test.go +++ b/rules/aip0135/request_message_name_test.go @@ -47,7 +47,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0135/request_name_behavior_test.go b/rules/aip0135/request_name_behavior_test.go index c32071b7e..281627d17 100644 --- a/rules/aip0135/request_name_behavior_test.go +++ b/rules/aip0135/request_name_behavior_test.go @@ -40,7 +40,7 @@ func TestRequestNameBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNameBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0135/request_name_reference_test.go b/rules/aip0135/request_name_reference_test.go index 5d6de2ca6..83ce168be 100644 --- a/rules/aip0135/request_name_reference_test.go +++ b/rules/aip0135/request_name_reference_test.go @@ -31,7 +31,7 @@ func TestRequestNameReference(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(requestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) t.Run("Absent", func(t *testing.T) { @@ -52,7 +52,7 @@ func TestRequestNameReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0135/request_required_fields_test.go b/rules/aip0135/request_required_fields_test.go index 33b05e865..95364b1b0 100644 --- a/rules/aip0135/request_required_fields_test.go +++ b/rules/aip0135/request_required_fields_test.go @@ -94,7 +94,7 @@ func TestRequiredFieldTests(t *testing.T) { dbr = f.FindMessage("DeleteBookRequest").FindFieldByName(test.problematicFieldName) } if diff := test.problems.SetDescriptor(dbr).Diff(requestRequiredFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0135/request_unknown_fields_test.go b/rules/aip0135/request_unknown_fields_test.go index 452bd97bf..ab4b21b09 100644 --- a/rules/aip0135/request_unknown_fields_test.go +++ b/rules/aip0135/request_unknown_fields_test.go @@ -58,7 +58,7 @@ func TestUnknownFields(t *testing.T) { wantProblems := test.problems.SetDescriptor(message.FindFieldByName(test.fieldName)) gotProblems := unknownFields.Lint(message.GetFile()) if diff := wantProblems.Diff(gotProblems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0135/response_lro_test.go b/rules/aip0135/response_lro_test.go index 842bef33f..61fc26d36 100644 --- a/rules/aip0135/response_lro_test.go +++ b/rules/aip0135/response_lro_test.go @@ -53,7 +53,7 @@ func TestResponseLRO(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(responseLRO.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0135/response_message_name_test.go b/rules/aip0135/response_message_name_test.go index 0be1840b1..4b321d9a7 100644 --- a/rules/aip0135/response_message_name_test.go +++ b/rules/aip0135/response_message_name_test.go @@ -107,7 +107,7 @@ func TestResponseMessageName(t *testing.T) { method := file.GetServices()[0].GetMethods()[0] problems := responseMessageName.Lint(file) if diff := test.problems[tmplName].SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/declarative_standard_methods_only_test.go b/rules/aip0136/declarative_standard_methods_only_test.go index 8bc3b1a49..8bbf6235c 100644 --- a/rules/aip0136/declarative_standard_methods_only_test.go +++ b/rules/aip0136/declarative_standard_methods_only_test.go @@ -60,7 +60,7 @@ func TestDeclarativeFriendly(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(standardMethodsOnly.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/http_body_test.go b/rules/aip0136/http_body_test.go index b14652853..d2c3e9e72 100644 --- a/rules/aip0136/http_body_test.go +++ b/rules/aip0136/http_body_test.go @@ -55,7 +55,7 @@ func TestHttpBody(t *testing.T) { method := file.GetServices()[0].GetMethods()[0] problems := httpBody.Lint(file) if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/http_method_test.go b/rules/aip0136/http_method_test.go index 7985ebe95..c769b80c1 100644 --- a/rules/aip0136/http_method_test.go +++ b/rules/aip0136/http_method_test.go @@ -54,7 +54,7 @@ func TestHttpMethod(t *testing.T) { method := file.GetServices()[0].GetMethods()[0] got := httpMethod.Lint(file) if diff := test.problems.SetDescriptor(method).Diff(got); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/http_name_variable_test.go b/rules/aip0136/http_name_variable_test.go index 64afce08c..184eeb1da 100644 --- a/rules/aip0136/http_name_variable_test.go +++ b/rules/aip0136/http_name_variable_test.go @@ -51,7 +51,7 @@ func TestHTTPVariables(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(httpNameVariable.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/http_parent_variable_test.go b/rules/aip0136/http_parent_variable_test.go index 59c69552b..f16551318 100644 --- a/rules/aip0136/http_parent_variable_test.go +++ b/rules/aip0136/http_parent_variable_test.go @@ -53,7 +53,7 @@ func TestHTTPParentVariable(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(httpParentVariable.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/http_uri_suffix_test.go b/rules/aip0136/http_uri_suffix_test.go index 7adba1c4c..78add7f4f 100644 --- a/rules/aip0136/http_uri_suffix_test.go +++ b/rules/aip0136/http_uri_suffix_test.go @@ -61,7 +61,7 @@ func TestURISuffix(t *testing.T) { method := file.GetServices()[0].GetMethods()[0] problems := uriSuffix.Lint(file) if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/prepositions_test.go b/rules/aip0136/prepositions_test.go index 132183542..db93d9bab 100644 --- a/rules/aip0136/prepositions_test.go +++ b/rules/aip0136/prepositions_test.go @@ -41,7 +41,7 @@ func TestNoPrepositions(t *testing.T) { method := file.GetServices()[0].GetMethods()[0] got := noPrepositions.Lint(file) if diff := test.problems.SetDescriptor(method).Diff(got); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/request_message_name_test.go b/rules/aip0136/request_message_name_test.go index f20de8a92..5f70929be 100644 --- a/rules/aip0136/request_message_name_test.go +++ b/rules/aip0136/request_message_name_test.go @@ -45,7 +45,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0136/verb_noun_test.go b/rules/aip0136/verb_noun_test.go index 9142ee275..e391002bd 100644 --- a/rules/aip0136/verb_noun_test.go +++ b/rules/aip0136/verb_noun_test.go @@ -40,7 +40,7 @@ func TestVerbNoun(t *testing.T) { method := file.GetServices()[0].GetMethods()[0] got := verbNoun.Lint(file) if diff := test.problems.SetDescriptor(method).Diff(got); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0140/abbreviations_test.go b/rules/aip0140/abbreviations_test.go index 9f31cf06a..3d45fe76a 100644 --- a/rules/aip0140/abbreviations_test.go +++ b/rules/aip0140/abbreviations_test.go @@ -100,7 +100,7 @@ func TestAbbreviations(t *testing.T) { // Establish that we get the problems we expect. problems := abbreviations.Lint(file) if diff := test.problems.SetDescriptor(d).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0140/base64_test.go b/rules/aip0140/base64_test.go index 146558125..a98ddb19f 100644 --- a/rules/aip0140/base64_test.go +++ b/rules/aip0140/base64_test.go @@ -48,7 +48,7 @@ func TestBase64(t *testing.T) { field := file.GetMessageTypes()[0].GetFields()[0] problems := base64.Lint(file) if diff := test.problems.SetDescriptor(field).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0140/lower_snake_test.go b/rules/aip0140/lower_snake_test.go index e5c7037bc..676380dc8 100644 --- a/rules/aip0140/lower_snake_test.go +++ b/rules/aip0140/lower_snake_test.go @@ -50,7 +50,7 @@ func TestLowerSnake(t *testing.T) { // of problems. problems := lowerSnake.Lint(message.GetFile()) if diff := test.problems.SetDescriptor(message.GetFields()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0140/numbers_test.go b/rules/aip0140/numbers_test.go index b65c5f61c..6255f4595 100644 --- a/rules/aip0140/numbers_test.go +++ b/rules/aip0140/numbers_test.go @@ -40,7 +40,7 @@ func TestNumbers(t *testing.T) { `, test) field := file.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(numbers.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0140/prepositions_test.go b/rules/aip0140/prepositions_test.go index 189af1459..d85920cda 100644 --- a/rules/aip0140/prepositions_test.go +++ b/rules/aip0140/prepositions_test.go @@ -42,7 +42,7 @@ func TestNoPrepositions(t *testing.T) { `, test) field := file.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(noPrepositions.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0140/reserved_words_test.go b/rules/aip0140/reserved_words_test.go index d0e521549..ea9e65dd7 100644 --- a/rules/aip0140/reserved_words_test.go +++ b/rules/aip0140/reserved_words_test.go @@ -32,7 +32,7 @@ func TestReservedWords(t *testing.T) { field := f.GetMessageTypes()[0].GetFields()[1] want := testutils.Problems{{Message: field.GetName(), Descriptor: field}} if diff := want.Diff(reservedWords.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) }) diff --git a/rules/aip0140/underscores_test.go b/rules/aip0140/underscores_test.go index 2437b0998..a83c24c9c 100644 --- a/rules/aip0140/underscores_test.go +++ b/rules/aip0140/underscores_test.go @@ -43,7 +43,7 @@ func TestUnderscores(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(underscores.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0140/uri_test.go b/rules/aip0140/uri_test.go index cd8b558ae..ba368cb52 100644 --- a/rules/aip0140/uri_test.go +++ b/rules/aip0140/uri_test.go @@ -43,7 +43,7 @@ func TestURI(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(uri.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0141/count_suffix_test.go b/rules/aip0141/count_suffix_test.go index 0cc5799ba..bfe594fd3 100644 --- a/rules/aip0141/count_suffix_test.go +++ b/rules/aip0141/count_suffix_test.go @@ -51,7 +51,7 @@ func TestCount(t *testing.T) { }) } if diff := wantProblems.Diff(count.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0141/forbidden_types_test.go b/rules/aip0141/forbidden_types_test.go index 91b47c66b..2b7361aed 100644 --- a/rules/aip0141/forbidden_types_test.go +++ b/rules/aip0141/forbidden_types_test.go @@ -42,7 +42,7 @@ func TestForbiddenTypes(t *testing.T) { field := file.GetMessageTypes()[0].GetFields()[0] problems := forbiddenTypes.Lint(file) if diff := test.problems.SetDescriptor(field).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0142/time_field_names_test.go b/rules/aip0142/time_field_names_test.go index 4898033a6..83ac3c359 100644 --- a/rules/aip0142/time_field_names_test.go +++ b/rules/aip0142/time_field_names_test.go @@ -47,7 +47,7 @@ func TestFieldName(t *testing.T) { `, test) field := file.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(fieldNames.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0142/time_field_type_test.go b/rules/aip0142/time_field_type_test.go index 131b4583b..bddeebe01 100644 --- a/rules/aip0142/time_field_type_test.go +++ b/rules/aip0142/time_field_type_test.go @@ -47,7 +47,7 @@ func TestFieldType(t *testing.T) { `, test) field := file.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(fieldType.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0143/standardized_codes_test.go b/rules/aip0143/standardized_codes_test.go index ff4290946..03a2bb680 100644 --- a/rules/aip0143/standardized_codes_test.go +++ b/rules/aip0143/standardized_codes_test.go @@ -50,7 +50,7 @@ func TestFieldNames(t *testing.T) { field := file.GetMessageTypes()[0].GetFields()[0] problems := fieldNames.Lint(file) if diff := test.problems.SetDescriptor(field).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0143/string_type_test.go b/rules/aip0143/string_type_test.go index 1e82f023b..8f139270d 100644 --- a/rules/aip0143/string_type_test.go +++ b/rules/aip0143/string_type_test.go @@ -48,7 +48,7 @@ func TestFieldTypes(t *testing.T) { field := file.GetMessageTypes()[0].GetFields()[0] problems := fieldTypes.Lint(file) if diff := test.problems.SetDescriptor(field).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0144/request_message_name_test.go b/rules/aip0144/request_message_name_test.go index 95fa0f345..cf108b181 100644 --- a/rules/aip0144/request_message_name_test.go +++ b/rules/aip0144/request_message_name_test.go @@ -47,7 +47,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0146/any_test.go b/rules/aip0146/any_test.go index a913c4f57..d164fa1d1 100644 --- a/rules/aip0146/any_test.go +++ b/rules/aip0146/any_test.go @@ -43,7 +43,7 @@ func TestAny(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(any.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0148/human_names_test.go b/rules/aip0148/human_names_test.go index 1793ed5d2..2f8692a9f 100644 --- a/rules/aip0148/human_names_test.go +++ b/rules/aip0148/human_names_test.go @@ -38,7 +38,7 @@ func TestHumanNames(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(humanNames.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0148/ip_address_format_test.go b/rules/aip0148/ip_address_format_test.go index 7c56ac285..903e9172b 100644 --- a/rules/aip0148/ip_address_format_test.go +++ b/rules/aip0148/ip_address_format_test.go @@ -78,7 +78,7 @@ func TestIpAddressFormat(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(ipAddressFormat.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0148/uid_format_test.go b/rules/aip0148/uid_format_test.go index 85a421cba..a30721e1b 100644 --- a/rules/aip0148/uid_format_test.go +++ b/rules/aip0148/uid_format_test.go @@ -67,7 +67,7 @@ func TestUidFormat(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(uidFormat.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0148/use_uid_test.go b/rules/aip0148/use_uid_test.go index 8c3c5c4d0..55b87a70a 100644 --- a/rules/aip0148/use_uid_test.go +++ b/rules/aip0148/use_uid_test.go @@ -45,7 +45,7 @@ func TestUseUid(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[1] if diff := test.problems.SetDescriptor(field).Diff(useUid.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0151/lro_metadata_reachable_test.go b/rules/aip0151/lro_metadata_reachable_test.go index ede6302f1..d014c61e7 100644 --- a/rules/aip0151/lro_metadata_reachable_test.go +++ b/rules/aip0151/lro_metadata_reachable_test.go @@ -56,7 +56,7 @@ func TestLROMetadataReachable(t *testing.T) { problems := lroMetadataReachable.Lint(f) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -95,7 +95,7 @@ func TestLROMetadataReachable(t *testing.T) { problems := lroMetadataReachable.Lint(files["test.proto"]) method := files["test.proto"].GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0151/lro_metadata_type_test.go b/rules/aip0151/lro_metadata_type_test.go index 9a73ccdae..aac29f2c0 100644 --- a/rules/aip0151/lro_metadata_type_test.go +++ b/rules/aip0151/lro_metadata_type_test.go @@ -50,7 +50,7 @@ func TestLROMetadata(t *testing.T) { problems := lroMetadata.Lint(f) d := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(d).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0151/lro_response_type_test.go b/rules/aip0151/lro_response_type_test.go index 9875e0911..a50c8a404 100644 --- a/rules/aip0151/lro_response_type_test.go +++ b/rules/aip0151/lro_response_type_test.go @@ -51,7 +51,7 @@ func TestLROResponse(t *testing.T) { problems := lroResponse.Lint(f) d := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(d).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0151/operation_info_test.go b/rules/aip0151/operation_info_test.go index 88993ca26..cda1a3e8d 100644 --- a/rules/aip0151/operation_info_test.go +++ b/rules/aip0151/operation_info_test.go @@ -34,7 +34,7 @@ func TestAnnotationExistsValid(t *testing.T) { message WriteBookRequest {} `) if diff := (testutils.Problems{}).Diff(lroAnnotationExists.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } @@ -51,6 +51,6 @@ func TestAnnotationExistsInvalid(t *testing.T) { Message: "operation_info annotation", }} if diff := want.Diff(lroAnnotationExists.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } diff --git a/rules/aip0151/response_unary_test.go b/rules/aip0151/response_unary_test.go index a89de7aa2..dc168cc46 100644 --- a/rules/aip0151/response_unary_test.go +++ b/rules/aip0151/response_unary_test.go @@ -42,7 +42,7 @@ func TestResponseUnary(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(responseUnary.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0152/http_uri_suffix_test.go b/rules/aip0152/http_uri_suffix_test.go index bdd467ee7..7f0d567f8 100644 --- a/rules/aip0152/http_uri_suffix_test.go +++ b/rules/aip0152/http_uri_suffix_test.go @@ -50,7 +50,7 @@ func TestHttpUriSuffix(t *testing.T) { `, test) problems := httpURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0152/request_message_name_test.go b/rules/aip0152/request_message_name_test.go index 640722e46..28be640cd 100644 --- a/rules/aip0152/request_message_name_test.go +++ b/rules/aip0152/request_message_name_test.go @@ -45,7 +45,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0152/request_name_behavior_test.go b/rules/aip0152/request_name_behavior_test.go index b0f3e5448..c2fdaf32b 100644 --- a/rules/aip0152/request_name_behavior_test.go +++ b/rules/aip0152/request_name_behavior_test.go @@ -42,7 +42,7 @@ func TestRequestNameBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNameBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0152/request_name_reference_test.go b/rules/aip0152/request_name_reference_test.go index 80f1bd01e..a7a2985ad 100644 --- a/rules/aip0152/request_name_reference_test.go +++ b/rules/aip0152/request_name_reference_test.go @@ -31,7 +31,7 @@ func TestRequestNameReference(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(requestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) t.Run("Absent", func(t *testing.T) { @@ -52,7 +52,7 @@ func TestRequestNameReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0152/request_resource_suffix_test.go b/rules/aip0152/request_resource_suffix_test.go index 7f8876636..09670cf0b 100644 --- a/rules/aip0152/request_resource_suffix_test.go +++ b/rules/aip0152/request_resource_suffix_test.go @@ -46,7 +46,7 @@ func TestRequestResourceSuffix(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestResourceSuffix.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0152/response_message_name_test.go b/rules/aip0152/response_message_name_test.go index c9e1fded1..2dffbd97f 100644 --- a/rules/aip0152/response_message_name_test.go +++ b/rules/aip0152/response_message_name_test.go @@ -48,7 +48,7 @@ func TestResponseMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(responseMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0154/declarative_friendly_required_test.go b/rules/aip0154/declarative_friendly_required_test.go index 489e86fc2..49dddb552 100644 --- a/rules/aip0154/declarative_friendly_required_test.go +++ b/rules/aip0154/declarative_friendly_required_test.go @@ -47,7 +47,7 @@ func TestDeclarativeFriendlyRequired(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(declarativeFriendlyRequired.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } }) @@ -109,7 +109,7 @@ func TestDeclarativeFriendlyRequired(t *testing.T) { `, test) m := f.FindMessage("DeleteBookRequest") if diff := test.problems.SetDescriptor(m).Diff(declarativeFriendlyRequired.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0154/no_duplicate_etag_test.go b/rules/aip0154/no_duplicate_etag_test.go index 31b201b8c..beebfbeba 100644 --- a/rules/aip0154/no_duplicate_etag_test.go +++ b/rules/aip0154/no_duplicate_etag_test.go @@ -53,7 +53,7 @@ func TestNoDuplicateEtag(t *testing.T) { `, test) m := f.GetMessageTypes() if diff := test.problems.SetDescriptor(m[0].FindFieldByName("etag")).Diff(noDuplicateEtag.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0155/request_id_format_test.go b/rules/aip0155/request_id_format_test.go index 138d889f2..616f79f2d 100644 --- a/rules/aip0155/request_id_format_test.go +++ b/rules/aip0155/request_id_format_test.go @@ -65,7 +65,7 @@ func TestRequestIdFormat(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestIdFormat.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0156/forbidden_methods_test.go b/rules/aip0156/forbidden_methods_test.go index 8b3e1443a..1f3c3972f 100644 --- a/rules/aip0156/forbidden_methods_test.go +++ b/rules/aip0156/forbidden_methods_test.go @@ -50,7 +50,7 @@ func TestForbiddenMethods(t *testing.T) { method := f.GetServices()[0].GetMethods()[0] problems := forbiddenMethods.Lint(f) if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0158/response_next_page_token_field_test.go b/rules/aip0158/response_next_page_token_field_test.go index 3ec93acf7..0b9ba944e 100644 --- a/rules/aip0158/response_next_page_token_field_test.go +++ b/rules/aip0158/response_next_page_token_field_test.go @@ -87,7 +87,7 @@ func TestResponsePaginationNextPageToken(t *testing.T) { // Run the lint rule, and establish that it returns the correct problems. problems := responsePaginationNextPageToken.Lint(message.GetFile()) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0158/response_plural_first_field_test.go b/rules/aip0158/response_plural_first_field_test.go index 3db6334e0..a99fe4619 100644 --- a/rules/aip0158/response_plural_first_field_test.go +++ b/rules/aip0158/response_plural_first_field_test.go @@ -50,7 +50,7 @@ func TestResponsePluralFirstField(t *testing.T) { // Run the lint rule and establish we get the correct problems. problems := responsePluralFirstField.Lint(f) if diff := test.problems.SetDescriptor(f.GetMessageTypes()[1].FindFieldByNumber(1)).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -88,7 +88,7 @@ func TestResponsePluralFirstField(t *testing.T) { // Run the lint rule and establish we get the correct problems. problems := responsePluralFirstField.Lint(f) if diff := test.problems.SetDescriptor(f.GetMessageTypes()[1].FindFieldByNumber(1)).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0158/response_repeated_first_field_test.go b/rules/aip0158/response_repeated_first_field_test.go index c082b058d..55f9a43ac 100644 --- a/rules/aip0158/response_repeated_first_field_test.go +++ b/rules/aip0158/response_repeated_first_field_test.go @@ -53,7 +53,7 @@ func TestResponseRepeatedFirstField(t *testing.T) { // Run the lint rule and establish we get the correct problems. problems := responseRepeatedFirstField.Lint(f) if diff := test.problems.Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0158/response_unary_test.go b/rules/aip0158/response_unary_test.go index a6dd48682..c5b860b20 100644 --- a/rules/aip0158/response_unary_test.go +++ b/rules/aip0158/response_unary_test.go @@ -47,7 +47,7 @@ func TestResponseUnary(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(responseUnary.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0159/hardcoded_hyphen_test.go b/rules/aip0159/hardcoded_hyphen_test.go index 5cec68e4c..0c13efbcf 100644 --- a/rules/aip0159/hardcoded_hyphen_test.go +++ b/rules/aip0159/hardcoded_hyphen_test.go @@ -43,7 +43,7 @@ func TestHardcodedHyphen(t *testing.T) { `, test) method := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(method).Diff(hardcodedHyphen.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0162/commit_http_uri_suffix_test.go b/rules/aip0162/commit_http_uri_suffix_test.go index 2d222e8a7..c25f2c17b 100644 --- a/rules/aip0162/commit_http_uri_suffix_test.go +++ b/rules/aip0162/commit_http_uri_suffix_test.go @@ -50,7 +50,7 @@ func TestCommitHTTPURISuffix(t *testing.T) { problems := commitHTTPURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/commit_request_message_name_test.go b/rules/aip0162/commit_request_message_name_test.go index bd9e1a432..3dc8c65d6 100644 --- a/rules/aip0162/commit_request_message_name_test.go +++ b/rules/aip0162/commit_request_message_name_test.go @@ -43,7 +43,7 @@ func TestCommitRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(commitRequestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/commit_request_name_field_test.go b/rules/aip0162/commit_request_name_field_test.go index e7727fba4..100fa0bef 100644 --- a/rules/aip0162/commit_request_name_field_test.go +++ b/rules/aip0162/commit_request_name_field_test.go @@ -44,7 +44,7 @@ func TestCommitRequestNameField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(commitRequestNameField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/commit_request_name_reference_test.go b/rules/aip0162/commit_request_name_reference_test.go index 61ef05941..54f27bae0 100644 --- a/rules/aip0162/commit_request_name_reference_test.go +++ b/rules/aip0162/commit_request_name_reference_test.go @@ -42,7 +42,7 @@ func TestCommitRequestNameReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(commitRequestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/commit_response_message_name_test.go b/rules/aip0162/commit_response_message_name_test.go index acd6437c5..253282867 100644 --- a/rules/aip0162/commit_response_message_name_test.go +++ b/rules/aip0162/commit_response_message_name_test.go @@ -41,7 +41,7 @@ func TestCommitResponseMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(commitResponseMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -75,7 +75,7 @@ func TestCommitResponseMessageNameLRO(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(commitResponseMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/delete_revision_http_uri_suffix_test.go b/rules/aip0162/delete_revision_http_uri_suffix_test.go index ec2c1c477..023954ea5 100644 --- a/rules/aip0162/delete_revision_http_uri_suffix_test.go +++ b/rules/aip0162/delete_revision_http_uri_suffix_test.go @@ -49,7 +49,7 @@ func TestDeleteRevisionHTTPURISuffix(t *testing.T) { problems := deleteRevisionHTTPURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/delete_revision_request_message_name_test.go b/rules/aip0162/delete_revision_request_message_name_test.go index 15140e093..3a26c1379 100644 --- a/rules/aip0162/delete_revision_request_message_name_test.go +++ b/rules/aip0162/delete_revision_request_message_name_test.go @@ -44,7 +44,7 @@ func TestDeleteRevisionRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(deleteRevisionRequestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/delete_revision_request_name_behavior_test.go b/rules/aip0162/delete_revision_request_name_behavior_test.go index 30471ca67..c67d7b5a7 100644 --- a/rules/aip0162/delete_revision_request_name_behavior_test.go +++ b/rules/aip0162/delete_revision_request_name_behavior_test.go @@ -42,7 +42,7 @@ func TestDeleteRevisionRequestNameBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(deleteRevisionRequestNameBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/delete_revision_request_name_field_test.go b/rules/aip0162/delete_revision_request_name_field_test.go index 2a0f19e92..249195d75 100644 --- a/rules/aip0162/delete_revision_request_name_field_test.go +++ b/rules/aip0162/delete_revision_request_name_field_test.go @@ -44,7 +44,7 @@ func TestDeleteRevisionRequestNameField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(deleteRevisionRequestNameField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/delete_revision_request_name_reference_test.go b/rules/aip0162/delete_revision_request_name_reference_test.go index 56a153112..bf981c963 100644 --- a/rules/aip0162/delete_revision_request_name_reference_test.go +++ b/rules/aip0162/delete_revision_request_name_reference_test.go @@ -42,7 +42,7 @@ func TestDeleteRevisionRequestNameReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(deleteRevisionRequestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/rollback_http_uri_suffix_test.go b/rules/aip0162/rollback_http_uri_suffix_test.go index d3660fe5b..2a4f1388a 100644 --- a/rules/aip0162/rollback_http_uri_suffix_test.go +++ b/rules/aip0162/rollback_http_uri_suffix_test.go @@ -50,7 +50,7 @@ func TestRollbackHTTPURISuffix(t *testing.T) { problems := rollbackHTTPURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/rollback_request_message_name_test.go b/rules/aip0162/rollback_request_message_name_test.go index ac859860b..129c459ea 100644 --- a/rules/aip0162/rollback_request_message_name_test.go +++ b/rules/aip0162/rollback_request_message_name_test.go @@ -44,7 +44,7 @@ func TestRollbackRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(rollbackRequestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/rollback_request_name_field_test.go b/rules/aip0162/rollback_request_name_field_test.go index 6013aa4db..b5e934688 100644 --- a/rules/aip0162/rollback_request_name_field_test.go +++ b/rules/aip0162/rollback_request_name_field_test.go @@ -44,7 +44,7 @@ func TestRollbackRequestNameField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(rollbackRequestNameField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/rollback_request_name_reference_test.go b/rules/aip0162/rollback_request_name_reference_test.go index 44f9c9520..19413e8da 100644 --- a/rules/aip0162/rollback_request_name_reference_test.go +++ b/rules/aip0162/rollback_request_name_reference_test.go @@ -42,7 +42,7 @@ func TestRollbackRequestNameReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(rollbackRequestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/rollback_request_revision_id_field_test.go b/rules/aip0162/rollback_request_revision_id_field_test.go index 5d006f98b..c2b808680 100644 --- a/rules/aip0162/rollback_request_revision_id_field_test.go +++ b/rules/aip0162/rollback_request_revision_id_field_test.go @@ -44,7 +44,7 @@ func TestRollbackRequestRevisionIDField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(rollbackRequestRevisionIDField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/rollback_response_message_name_test.go b/rules/aip0162/rollback_response_message_name_test.go index 87e801f2f..f5d7cee69 100644 --- a/rules/aip0162/rollback_response_message_name_test.go +++ b/rules/aip0162/rollback_response_message_name_test.go @@ -41,7 +41,7 @@ func TestRollbackResponseMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(rollbackResponseMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -75,7 +75,7 @@ func TestRollbackOperationResponse(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(rollbackResponseMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/tag_revision_http_uri_suffix_test.go b/rules/aip0162/tag_revision_http_uri_suffix_test.go index 1830c0b53..2e40f4060 100644 --- a/rules/aip0162/tag_revision_http_uri_suffix_test.go +++ b/rules/aip0162/tag_revision_http_uri_suffix_test.go @@ -50,7 +50,7 @@ func TestTagRevisionHTTPURISuffix(t *testing.T) { problems := tagRevisionHTTPURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/tag_revision_request_message_name_test.go b/rules/aip0162/tag_revision_request_message_name_test.go index fb17d4c79..84a51822f 100644 --- a/rules/aip0162/tag_revision_request_message_name_test.go +++ b/rules/aip0162/tag_revision_request_message_name_test.go @@ -44,7 +44,7 @@ func TestTagRevisionRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(tagRevisionRequestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/tag_revision_request_name_behavior_test.go b/rules/aip0162/tag_revision_request_name_behavior_test.go index a8fec2714..a90eb027d 100644 --- a/rules/aip0162/tag_revision_request_name_behavior_test.go +++ b/rules/aip0162/tag_revision_request_name_behavior_test.go @@ -42,7 +42,7 @@ func TestTagRevisionRequestNameBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(tagRevisionRequestNameBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/tag_revision_request_name_field_test.go b/rules/aip0162/tag_revision_request_name_field_test.go index 03c54ebf7..d19b562f7 100644 --- a/rules/aip0162/tag_revision_request_name_field_test.go +++ b/rules/aip0162/tag_revision_request_name_field_test.go @@ -44,7 +44,7 @@ func TestTagRevisionRequestNameField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(tagRevisionRequestNameField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/tag_revision_request_name_reference_test.go b/rules/aip0162/tag_revision_request_name_reference_test.go index ebd03a735..0d29a830a 100644 --- a/rules/aip0162/tag_revision_request_name_reference_test.go +++ b/rules/aip0162/tag_revision_request_name_reference_test.go @@ -42,7 +42,7 @@ func TestTagRevisionRequestNameReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(tagRevisionRequestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/tag_revision_request_tag_behavior_test.go b/rules/aip0162/tag_revision_request_tag_behavior_test.go index 8eea5aeb7..073110afb 100644 --- a/rules/aip0162/tag_revision_request_tag_behavior_test.go +++ b/rules/aip0162/tag_revision_request_tag_behavior_test.go @@ -42,7 +42,7 @@ func TestTagRevisionRequestTagBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(tagRevisionRequestTagBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/tag_revision_request_tag_field_test.go b/rules/aip0162/tag_revision_request_tag_field_test.go index fa69cee84..819f6b53a 100644 --- a/rules/aip0162/tag_revision_request_tag_field_test.go +++ b/rules/aip0162/tag_revision_request_tag_field_test.go @@ -44,7 +44,7 @@ func TestTagRevisionRequestTagField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(tagRevisionRequestTagField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0162/tag_revision_response_message_name_test.go b/rules/aip0162/tag_revision_response_message_name_test.go index 5fe4de036..32cfa591c 100644 --- a/rules/aip0162/tag_revision_response_message_name_test.go +++ b/rules/aip0162/tag_revision_response_message_name_test.go @@ -41,7 +41,7 @@ func TestTagRevisionResponseMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(tagRevisionResponseMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -75,7 +75,7 @@ func TestTagRevisionResponseMessageNameLRO(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(tagRevisionResponseMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0163/declarative_friendly_required_test.go b/rules/aip0163/declarative_friendly_required_test.go index b2aaead7b..5fd2d8590 100644 --- a/rules/aip0163/declarative_friendly_required_test.go +++ b/rules/aip0163/declarative_friendly_required_test.go @@ -73,7 +73,7 @@ func TestDeclarativeFriendlyRequired(t *testing.T) { `, test) dbr := f.FindMessage("DeleteBookRequest") if diff := test.problems.SetDescriptor(dbr).Diff(declarativeFriendlyRequired.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0163/synonyms_test.go b/rules/aip0163/synonyms_test.go index 83e448c50..bcf5bef26 100644 --- a/rules/aip0163/synonyms_test.go +++ b/rules/aip0163/synonyms_test.go @@ -36,7 +36,7 @@ func TestSynonyms(t *testing.T) { `, test) field := file.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(synonyms.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0164/http_uri_suffix_test.go b/rules/aip0164/http_uri_suffix_test.go index 59e75c6d8..5d3822893 100644 --- a/rules/aip0164/http_uri_suffix_test.go +++ b/rules/aip0164/http_uri_suffix_test.go @@ -52,7 +52,7 @@ func TestHttpUriSuffix(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0164/request_message_name_test.go b/rules/aip0164/request_message_name_test.go index c587b99e5..4ed685b84 100644 --- a/rules/aip0164/request_message_name_test.go +++ b/rules/aip0164/request_message_name_test.go @@ -47,7 +47,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0164/request_name_behavior_test.go b/rules/aip0164/request_name_behavior_test.go index 4c96a0b29..b0508fd58 100644 --- a/rules/aip0164/request_name_behavior_test.go +++ b/rules/aip0164/request_name_behavior_test.go @@ -42,7 +42,7 @@ func TestRequestNameBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNameBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0164/request_name_reference_test.go b/rules/aip0164/request_name_reference_test.go index 26edae9f6..246696162 100644 --- a/rules/aip0164/request_name_reference_test.go +++ b/rules/aip0164/request_name_reference_test.go @@ -31,7 +31,7 @@ func TestRequestNameReference(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(requestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) t.Run("Absent", func(t *testing.T) { @@ -52,7 +52,7 @@ func TestRequestNameReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNameReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0164/request_unknown_fields_test.go b/rules/aip0164/request_unknown_fields_test.go index 0d4d8ae13..70c258669 100644 --- a/rules/aip0164/request_unknown_fields_test.go +++ b/rules/aip0164/request_unknown_fields_test.go @@ -56,7 +56,7 @@ func TestRequestUnknownFields(t *testing.T) { wantProblems := test.problems.SetDescriptor(message.FindFieldByName(test.fieldName)) gotProblems := requestUnknownFields.Lint(message.GetFile()) if diff := wantProblems.Diff(gotProblems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0164/response_lro_test.go b/rules/aip0164/response_lro_test.go index 809acb899..d017105f4 100644 --- a/rules/aip0164/response_lro_test.go +++ b/rules/aip0164/response_lro_test.go @@ -50,7 +50,7 @@ func TestResponseLRO(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(responseLRO.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0164/response_message_name_test.go b/rules/aip0164/response_message_name_test.go index 72ebfac38..1bedd1247 100644 --- a/rules/aip0164/response_message_name_test.go +++ b/rules/aip0164/response_message_name_test.go @@ -73,7 +73,7 @@ func TestResponseMessageName(t *testing.T) { method := file.GetServices()[0].GetMethods()[0] problems := responseMessageName.Lint(file) if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/http_uri_suffix_test.go b/rules/aip0165/http_uri_suffix_test.go index b2050ca7c..beeebdfaa 100644 --- a/rules/aip0165/http_uri_suffix_test.go +++ b/rules/aip0165/http_uri_suffix_test.go @@ -52,7 +52,7 @@ func TestHttpUriSuffix(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/request_filter_behavior_test.go b/rules/aip0165/request_filter_behavior_test.go index fa42e60f9..7ff98ea7f 100644 --- a/rules/aip0165/request_filter_behavior_test.go +++ b/rules/aip0165/request_filter_behavior_test.go @@ -40,7 +40,7 @@ func TestRequestFilterBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestFilterBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/request_filter_field_test.go b/rules/aip0165/request_filter_field_test.go index 272a4133d..7461980e3 100644 --- a/rules/aip0165/request_filter_field_test.go +++ b/rules/aip0165/request_filter_field_test.go @@ -47,7 +47,7 @@ func TestFilterField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(requestFilterField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/request_force_field_test.go b/rules/aip0165/request_force_field_test.go index 35d03adac..41a3604cf 100644 --- a/rules/aip0165/request_force_field_test.go +++ b/rules/aip0165/request_force_field_test.go @@ -47,7 +47,7 @@ func TestForceField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(requestForceField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/request_message_name_test.go b/rules/aip0165/request_message_name_test.go index 3c43bef92..f32697488 100644 --- a/rules/aip0165/request_message_name_test.go +++ b/rules/aip0165/request_message_name_test.go @@ -45,7 +45,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/request_parent_behavior_test.go b/rules/aip0165/request_parent_behavior_test.go index 509b9fa94..ed4029078 100644 --- a/rules/aip0165/request_parent_behavior_test.go +++ b/rules/aip0165/request_parent_behavior_test.go @@ -40,7 +40,7 @@ func TestRequestParentBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/request_parent_field_test.go b/rules/aip0165/request_parent_field_test.go index 7e66828b7..d9542f661 100644 --- a/rules/aip0165/request_parent_field_test.go +++ b/rules/aip0165/request_parent_field_test.go @@ -72,7 +72,7 @@ func TestParentField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(requestParentField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/request_parent_reference_test.go b/rules/aip0165/request_parent_reference_test.go index d09a01ca6..5f983d0d3 100644 --- a/rules/aip0165/request_parent_reference_test.go +++ b/rules/aip0165/request_parent_reference_test.go @@ -42,7 +42,7 @@ func TestRequestParentReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/response_message_name_test.go b/rules/aip0165/response_message_name_test.go index 0d6ac0087..25a406dec 100644 --- a/rules/aip0165/response_message_name_test.go +++ b/rules/aip0165/response_message_name_test.go @@ -48,7 +48,7 @@ func TestResponseMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(responseMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/response_purge_count_field_test.go b/rules/aip0165/response_purge_count_field_test.go index 6de43f715..f1b17fe7f 100644 --- a/rules/aip0165/response_purge_count_field_test.go +++ b/rules/aip0165/response_purge_count_field_test.go @@ -47,7 +47,7 @@ func TestResponsePurgeCountField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(responsePurgeCountField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/response_purge_sample_field_test.go b/rules/aip0165/response_purge_sample_field_test.go index 2291fbb28..eb78fb252 100644 --- a/rules/aip0165/response_purge_sample_field_test.go +++ b/rules/aip0165/response_purge_sample_field_test.go @@ -47,7 +47,7 @@ func TestResponsePurgeSampleField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(responsePurgeSampleField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0165/response_purge_sample_reference_test.go b/rules/aip0165/response_purge_sample_reference_test.go index c44d6b53d..4a35b680a 100644 --- a/rules/aip0165/response_purge_sample_reference_test.go +++ b/rules/aip0165/response_purge_sample_reference_test.go @@ -42,7 +42,7 @@ func TestResponsePurgeSampleReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(responsePurgeSampleReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/csharp_namespace_test.go b/rules/aip0191/csharp_namespace_test.go index b9d224abb..5affa9162 100644 --- a/rules/aip0191/csharp_namespace_test.go +++ b/rules/aip0191/csharp_namespace_test.go @@ -56,7 +56,7 @@ func TestCsharpNamespace(t *testing.T) { service FooBar {} `, test) if diff := test.problems.SetDescriptor(f).Diff(csharpNamespace.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/file_layout_test.go b/rules/aip0191/file_layout_test.go index a54516d2c..475a052ae 100644 --- a/rules/aip0191/file_layout_test.go +++ b/rules/aip0191/file_layout_test.go @@ -42,7 +42,7 @@ func TestFileLayout(t *testing.T) { `) want := testutils.Problems{{Descriptor: f.GetServices()[0]}} if diff := want.Diff(fileLayout.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) @@ -55,7 +55,7 @@ func TestFileLayout(t *testing.T) { `) want := testutils.Problems{{Descriptor: f.GetEnumTypes()[0]}} if diff := want.Diff(fileLayout.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) diff --git a/rules/aip0191/file_option_consistency_test.go b/rules/aip0191/file_option_consistency_test.go index e918299d9..eef5c9db7 100644 --- a/rules/aip0191/file_option_consistency_test.go +++ b/rules/aip0191/file_option_consistency_test.go @@ -71,7 +71,7 @@ func TestFileOptionConsistency(t *testing.T) { t.Fatalf("Could not build test file.") } if diff := test.getProblems(testFile).Diff(fileOptionConsistency.Lint(testFile)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -85,7 +85,7 @@ func TestFileOptionConsistency(t *testing.T) { t.Fatalf("Could not build test file.") } if diff := (testutils.Problems{}).Diff(fileOptionConsistency.Lint(testFile)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/filenames_test.go b/rules/aip0191/filenames_test.go index 9849b0f15..71bcf8299 100644 --- a/rules/aip0191/filenames_test.go +++ b/rules/aip0191/filenames_test.go @@ -51,7 +51,7 @@ func TestFilename(t *testing.T) { t.Fatalf("Failed to build file.") } if diff := test.problems.SetDescriptor(f).Diff(filename.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/java_multiple_files_test.go b/rules/aip0191/java_multiple_files_test.go index 71146d100..d7aee3bf3 100644 --- a/rules/aip0191/java_multiple_files_test.go +++ b/rules/aip0191/java_multiple_files_test.go @@ -38,7 +38,7 @@ func TestJavaMultipleFiles(t *testing.T) { {{.Opt}} `, test) if diff := test.problems.SetDescriptor(f).Diff(javaMultipleFiles.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/java_outer_classname_test.go b/rules/aip0191/java_outer_classname_test.go index f10ae3a74..6f6dceda9 100644 --- a/rules/aip0191/java_outer_classname_test.go +++ b/rules/aip0191/java_outer_classname_test.go @@ -44,7 +44,7 @@ func TestJavaOuterClassname(t *testing.T) { files := testutils.ParseProtoStrings(t, map[string]string{test.filename: strings.Join(test.statements, "\n")}) f := files[test.filename] if diff := test.problems.SetDescriptor(f).Diff(javaOuterClassname.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/java_package_test.go b/rules/aip0191/java_package_test.go index 35b081fad..f803f2d8c 100644 --- a/rules/aip0191/java_package_test.go +++ b/rules/aip0191/java_package_test.go @@ -38,7 +38,7 @@ func TestJavaPackage(t *testing.T) { t.Run(test.name, func(t *testing.T) { f := testutils.ParseProto3String(t, strings.Join(test.statements, "\n")) if diff := test.problems.SetDescriptor(f).Diff(javaPackage.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/php_namespace_test.go b/rules/aip0191/php_namespace_test.go index aa1a8cac7..8f06c2326 100644 --- a/rules/aip0191/php_namespace_test.go +++ b/rules/aip0191/php_namespace_test.go @@ -51,7 +51,7 @@ func TestPhpNamespace(t *testing.T) { service FooBar {} `, test) if diff := test.problems.SetDescriptor(f).Diff(phpNamespace.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/proto_version_test.go b/rules/aip0191/proto_version_test.go index d423c5710..a8ec6603d 100644 --- a/rules/aip0191/proto_version_test.go +++ b/rules/aip0191/proto_version_test.go @@ -43,7 +43,7 @@ func TestSyntax(t *testing.T) { // Lint the file, and ensure we got the expected problems. if diff := test.problems.SetDescriptor(f).Diff(syntax.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0191/ruby_package_test.go b/rules/aip0191/ruby_package_test.go index 59c7cb988..7a52bb333 100644 --- a/rules/aip0191/ruby_package_test.go +++ b/rules/aip0191/ruby_package_test.go @@ -51,7 +51,7 @@ func TestRubyPackage(t *testing.T) { service FooBar {} `, test) if diff := test.problems.SetDescriptor(f).Diff(rubyPackage.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0192/absolute_links_test.go b/rules/aip0192/absolute_links_test.go index 141780b50..7ae6c1120 100644 --- a/rules/aip0192/absolute_links_test.go +++ b/rules/aip0192/absolute_links_test.go @@ -38,7 +38,7 @@ func TestAbsoluteLinks(t *testing.T) { m := f.GetMessageTypes()[0] problems := absoluteLinks.Lint(f) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0192/no_html_test.go b/rules/aip0192/no_html_test.go index 70c6c2bff..304fb7e43 100644 --- a/rules/aip0192/no_html_test.go +++ b/rules/aip0192/no_html_test.go @@ -47,7 +47,7 @@ func TestNoHTML(t *testing.T) { `, "{{.Comment}}", test.comment)) message := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(message).Diff(noHTML.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0192/no_markdown_headings_test.go b/rules/aip0192/no_markdown_headings_test.go index def716deb..04d444255 100644 --- a/rules/aip0192/no_markdown_headings_test.go +++ b/rules/aip0192/no_markdown_headings_test.go @@ -44,7 +44,7 @@ func TestNoMarkdownHeadings(t *testing.T) { `, struct{ Comment string }{cmt}) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(noMarkdownHeadings.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0192/no_markdown_tables_test.go b/rules/aip0192/no_markdown_tables_test.go index cda18cb2a..72e614e69 100644 --- a/rules/aip0192/no_markdown_tables_test.go +++ b/rules/aip0192/no_markdown_tables_test.go @@ -43,7 +43,7 @@ func TestNoMarkdownTables(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(noMarkdownTables.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0192/only_leading_comments_test.go b/rules/aip0192/only_leading_comments_test.go index 6740b0f68..c8f281ae2 100644 --- a/rules/aip0192/only_leading_comments_test.go +++ b/rules/aip0192/only_leading_comments_test.go @@ -85,7 +85,7 @@ func TestOnlyLeadingComments(t *testing.T) { `, test) problems := onlyLeadingComments.Lint(file) if diff := test.problems.SetDescriptor(file.GetMessageTypes()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0192/trademarked_names_test.go b/rules/aip0192/trademarked_names_test.go index abb444c57..7d06e446d 100644 --- a/rules/aip0192/trademarked_names_test.go +++ b/rules/aip0192/trademarked_names_test.go @@ -42,7 +42,7 @@ func TestTrademarkedNames(t *testing.T) { `, test) m := f.GetMessageTypes()[0] if diff := test.problems.SetDescriptor(m).Diff(trademarkedNames.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0203/field_behavior_required_test.go b/rules/aip0203/field_behavior_required_test.go index 244380dc5..fd934f847 100644 --- a/rules/aip0203/field_behavior_required_test.go +++ b/rules/aip0203/field_behavior_required_test.go @@ -124,7 +124,7 @@ func TestFieldBehaviorRequired_SingleFile_SingleMessage(t *testing.T) { field := f.GetMessageTypes()[0].GetFields()[0] if diff := tc.problems.SetDescriptor(field).Diff(fieldBehaviorRequired.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -177,7 +177,7 @@ func TestFieldBehaviorRequired_Resource_SingleFile(t *testing.T) { field := f.GetMessageTypes()[1].GetFields()[1] if diff := tc.problems.SetDescriptor(field).Diff(fieldBehaviorRequired.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -242,7 +242,7 @@ func TestFieldBehaviorRequired_NestedMessages_SingleFile(t *testing.T) { nestedField := it.GetFields()[0].GetMessageType().GetFields()[0] if diff := tc.problems.SetDescriptor(nestedField).Diff(fieldBehaviorRequired.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -333,7 +333,7 @@ func TestFieldBehaviorRequired_NestedMessages_MultipleFile(t *testing.T) { fd := it.GetFields()[0].GetMessageType().GetFields()[0] if diff := tc.problems.SetDescriptor(fd).Diff(fieldBehaviorRequired.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } if tc.problems != nil { diff --git a/rules/aip0214/resource_expiry_test.go b/rules/aip0214/resource_expiry_test.go index 33b8299a2..81e9a6027 100644 --- a/rules/aip0214/resource_expiry_test.go +++ b/rules/aip0214/resource_expiry_test.go @@ -51,7 +51,7 @@ func TestResourceExpiry(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[1] if diff := test.problems.SetDescriptor(field).Diff(resourceExpiry.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0214/ttl_type_test.go b/rules/aip0214/ttl_type_test.go index 38300086d..b056e13ec 100644 --- a/rules/aip0214/ttl_type_test.go +++ b/rules/aip0214/ttl_type_test.go @@ -38,7 +38,7 @@ func TestTtlType(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[1] if diff := test.problems.SetDescriptor(field).Diff(ttlType.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } } } diff --git a/rules/aip0215/versioned_packages_test.go b/rules/aip0215/versioned_packages_test.go index 8a711b415..145809751 100644 --- a/rules/aip0215/versioned_packages_test.go +++ b/rules/aip0215/versioned_packages_test.go @@ -57,7 +57,7 @@ func TestVersionedPackages(t *testing.T) { t.Run(test.name, func(t *testing.T) { f := testutils.ParseProto3Tmpl(t, "{{.PackageStmt}}", test) if diff := test.problems.SetDescriptor(f).Diff(versionedPackages.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0216/nesting_test.go b/rules/aip0216/nesting_test.go index ac0f3f2e7..638aa793a 100644 --- a/rules/aip0216/nesting_test.go +++ b/rules/aip0216/nesting_test.go @@ -30,7 +30,7 @@ func TestNesting(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(nesting.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) t.Run("NotNested", func(t *testing.T) { @@ -56,7 +56,7 @@ func TestNesting(t *testing.T) { `, test) e := f.GetEnumTypes()[0] if diff := test.problems.SetDescriptor(e).Diff(nesting.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0216/state_field_output_only_test.go b/rules/aip0216/state_field_output_only_test.go index 00d2542d2..da30f5493 100644 --- a/rules/aip0216/state_field_output_only_test.go +++ b/rules/aip0216/state_field_output_only_test.go @@ -76,7 +76,7 @@ func TestStateFieldOutputOnly(t *testing.T) { field := f.GetMessageTypes()[0].GetFields()[1] if diff := test.problems.SetDescriptor(field).Diff(stateFieldOutputOnly.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0216/synonyms_test.go b/rules/aip0216/synonyms_test.go index efdda0798..24bb0e96b 100644 --- a/rules/aip0216/synonyms_test.go +++ b/rules/aip0216/synonyms_test.go @@ -39,7 +39,7 @@ func TestSynonyms(t *testing.T) { `, test) e := f.GetEnumTypes()[0] if diff := test.problems.SetDescriptor(e).Diff(synonyms.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0216/value_synonyms_test.go b/rules/aip0216/value_synonyms_test.go index 3b44ed764..404dc8a8f 100644 --- a/rules/aip0216/value_synonyms_test.go +++ b/rules/aip0216/value_synonyms_test.go @@ -46,7 +46,7 @@ func TestValueSynonyms(t *testing.T) { `, test) ev := file.GetEnumTypes()[0].GetValues()[1] if diff := test.problems.SetDescriptor(ev).Diff(valueSynonyms.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0217/return_partial_success_type_test.go b/rules/aip0217/return_partial_success_type_test.go index 7540f1965..9517fa159 100644 --- a/rules/aip0217/return_partial_success_type_test.go +++ b/rules/aip0217/return_partial_success_type_test.go @@ -40,7 +40,7 @@ func TestReturnPartialSuccessType(t *testing.T) { `, test) field := f.GetMessageTypes()[0].FindFieldByName("return_partial_success") if diff := test.problems.SetDescriptor(field).Diff(returnPartialSuccessType.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0217/return_partial_success_with_unreachable_test.go b/rules/aip0217/return_partial_success_with_unreachable_test.go index 5e3725aee..f75af842d 100644 --- a/rules/aip0217/return_partial_success_with_unreachable_test.go +++ b/rules/aip0217/return_partial_success_with_unreachable_test.go @@ -48,7 +48,7 @@ func TestReturnPartialSuccessWithUnreachable(t *testing.T) { `, test) field := f.GetMessageTypes()[0].FindFieldByName("return_partial_success") if diff := test.problems.SetDescriptor(field).Diff(returnPartialSuccessWithUnreachable.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0217/synonyms_test.go b/rules/aip0217/synonyms_test.go index f3b2c007d..477f597ad 100644 --- a/rules/aip0217/synonyms_test.go +++ b/rules/aip0217/synonyms_test.go @@ -45,7 +45,7 @@ func TestSynonyms(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[2] if diff := test.problems.SetDescriptor(field).Diff(synonyms.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0217/unreachable_field_type_test.go b/rules/aip0217/unreachable_field_type_test.go index 68549fe3f..8fc912d63 100644 --- a/rules/aip0217/unreachable_field_type_test.go +++ b/rules/aip0217/unreachable_field_type_test.go @@ -43,7 +43,7 @@ func TestUnreachableFieldType(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[2] if diff := test.problems.SetDescriptor(field).Diff(unreachableFieldType.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/http_uri_suffix_test.go b/rules/aip0231/http_uri_suffix_test.go index ed49ef9ec..3be812369 100644 --- a/rules/aip0231/http_uri_suffix_test.go +++ b/rules/aip0231/http_uri_suffix_test.go @@ -49,7 +49,7 @@ func TestHttpUrl(t *testing.T) { `, test) method := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(method).Diff(uriSuffix.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/plural_method_name_test.go b/rules/aip0231/plural_method_name_test.go index 6ed26b4de..8e772fb42 100644 --- a/rules/aip0231/plural_method_name_test.go +++ b/rules/aip0231/plural_method_name_test.go @@ -83,7 +83,7 @@ func TestPluralMethodResourceName(t *testing.T) { problems := pluralMethodResourceName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/request_message_name_test.go b/rules/aip0231/request_message_name_test.go index dd77c4af0..b43f9f645 100644 --- a/rules/aip0231/request_message_name_test.go +++ b/rules/aip0231/request_message_name_test.go @@ -55,7 +55,7 @@ func TestInputName(t *testing.T) { problems := inputName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/request_names_behavior_test.go b/rules/aip0231/request_names_behavior_test.go index f3beee517..97d8a5324 100644 --- a/rules/aip0231/request_names_behavior_test.go +++ b/rules/aip0231/request_names_behavior_test.go @@ -42,7 +42,7 @@ func TestRequestNamesBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNamesBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/request_names_field_test.go b/rules/aip0231/request_names_field_test.go index 883fc5c35..6cc8c6f98 100644 --- a/rules/aip0231/request_names_field_test.go +++ b/rules/aip0231/request_names_field_test.go @@ -144,7 +144,7 @@ func TestNamesField(t *testing.T) { problems := namesField.Lint(file) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/request_names_reference_test.go b/rules/aip0231/request_names_reference_test.go index fb583117c..749cacb28 100644 --- a/rules/aip0231/request_names_reference_test.go +++ b/rules/aip0231/request_names_reference_test.go @@ -42,7 +42,7 @@ func TestRequestNamesReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNamesReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/request_parent_field_test.go b/rules/aip0231/request_parent_field_test.go index 6a4dfb9c6..ea42a7c3d 100644 --- a/rules/aip0231/request_parent_field_test.go +++ b/rules/aip0231/request_parent_field_test.go @@ -72,7 +72,7 @@ func TestParentField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(requestParentField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/request_parent_reference_test.go b/rules/aip0231/request_parent_reference_test.go index b860f936d..5aaf0f5e2 100644 --- a/rules/aip0231/request_parent_reference_test.go +++ b/rules/aip0231/request_parent_reference_test.go @@ -42,7 +42,7 @@ func TestRequestParentReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/request_unknown_fields_test.go b/rules/aip0231/request_unknown_fields_test.go index 86bfc9c82..ba22e8c22 100644 --- a/rules/aip0231/request_unknown_fields_test.go +++ b/rules/aip0231/request_unknown_fields_test.go @@ -43,7 +43,7 @@ func TestRequestUnknownFields(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestUnknownFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/response_message_name_test.go b/rules/aip0231/response_message_name_test.go index 346a09239..74c02fe5f 100644 --- a/rules/aip0231/response_message_name_test.go +++ b/rules/aip0231/response_message_name_test.go @@ -55,7 +55,7 @@ func TestOutputName(t *testing.T) { problems := outputName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0231/response_resource_field_test.go b/rules/aip0231/response_resource_field_test.go index 37952bfd9..9dd0eaf3b 100644 --- a/rules/aip0231/response_resource_field_test.go +++ b/rules/aip0231/response_resource_field_test.go @@ -88,7 +88,7 @@ func TestResourceField(t *testing.T) { problems := resourceField.Lint(file) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/http_body_test.go b/rules/aip0233/http_body_test.go index 6cf2d6313..524cfd03b 100644 --- a/rules/aip0233/http_body_test.go +++ b/rules/aip0233/http_body_test.go @@ -54,7 +54,7 @@ func TestHttpBody(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpBody.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/http_method_test.go b/rules/aip0233/http_method_test.go index 4394f1187..1df6447c2 100644 --- a/rules/aip0233/http_method_test.go +++ b/rules/aip0233/http_method_test.go @@ -54,7 +54,7 @@ func TestHttpVerb(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpVerb.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/http_uri_suffix_test.go b/rules/aip0233/http_uri_suffix_test.go index 6cf7cf3cc..40860543c 100644 --- a/rules/aip0233/http_uri_suffix_test.go +++ b/rules/aip0233/http_uri_suffix_test.go @@ -53,7 +53,7 @@ func TestHttpUriSuffix(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/plural_method_name_test.go b/rules/aip0233/plural_method_name_test.go index bf6a68e16..6e37d19f6 100644 --- a/rules/aip0233/plural_method_name_test.go +++ b/rules/aip0233/plural_method_name_test.go @@ -88,7 +88,7 @@ func TestMethodPluralResourceName(t *testing.T) { problems := pluralMethodName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/request_message_name_test.go b/rules/aip0233/request_message_name_test.go index 8c535ecc5..f4d070bd4 100644 --- a/rules/aip0233/request_message_name_test.go +++ b/rules/aip0233/request_message_name_test.go @@ -74,7 +74,7 @@ func TestRequestMessageName(t *testing.T) { problems := requestMessageName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/request_parent_field_test.go b/rules/aip0233/request_parent_field_test.go index 8662d0849..148a0b001 100644 --- a/rules/aip0233/request_parent_field_test.go +++ b/rules/aip0233/request_parent_field_test.go @@ -72,7 +72,7 @@ func TestParentField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(requestParentField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/request_parent_reference_test.go b/rules/aip0233/request_parent_reference_test.go index 7a6bcdfa5..ab1f48989 100644 --- a/rules/aip0233/request_parent_reference_test.go +++ b/rules/aip0233/request_parent_reference_test.go @@ -42,7 +42,7 @@ func TestRequestParentReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/request_requests_behavior_test.go b/rules/aip0233/request_requests_behavior_test.go index 311e85c71..f5a942399 100644 --- a/rules/aip0233/request_requests_behavior_test.go +++ b/rules/aip0233/request_requests_behavior_test.go @@ -42,7 +42,7 @@ func TestRequestRequestsBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestRequestsBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/request_requests_field_test.go b/rules/aip0233/request_requests_field_test.go index 14f9e79a4..9a9f98039 100644 --- a/rules/aip0233/request_requests_field_test.go +++ b/rules/aip0233/request_requests_field_test.go @@ -93,7 +93,7 @@ func TestRequestRequestsField(t *testing.T) { problems := requestRequestsField.Lint(file) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/request_unknown_fields_test.go b/rules/aip0233/request_unknown_fields_test.go index f0e611d60..db9330175 100644 --- a/rules/aip0233/request_unknown_fields_test.go +++ b/rules/aip0233/request_unknown_fields_test.go @@ -42,7 +42,7 @@ func TestRequestUnknownFields(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestUnknownFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/response_message_name_test.go b/rules/aip0233/response_message_name_test.go index bf89f5a5e..568cb0b0a 100644 --- a/rules/aip0233/response_message_name_test.go +++ b/rules/aip0233/response_message_name_test.go @@ -74,7 +74,7 @@ func TestResponseMessageName(t *testing.T) { problems := responseMessageName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -127,7 +127,7 @@ func TestLongRunningResponse(t *testing.T) { problems := responseMessageName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0233/response_resource_field_test.go b/rules/aip0233/response_resource_field_test.go index d06ddc17d..1a23e1f3f 100644 --- a/rules/aip0233/response_resource_field_test.go +++ b/rules/aip0233/response_resource_field_test.go @@ -69,7 +69,7 @@ func TestResponseResourceField(t *testing.T) { problems := responseResourceField.Lint(file) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/http_body_test.go b/rules/aip0234/http_body_test.go index ebf78e47c..7c314e2ce 100644 --- a/rules/aip0234/http_body_test.go +++ b/rules/aip0234/http_body_test.go @@ -52,7 +52,7 @@ func TestHttpBody(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpBody.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/http_method_test.go b/rules/aip0234/http_method_test.go index 52b9c1478..567848458 100644 --- a/rules/aip0234/http_method_test.go +++ b/rules/aip0234/http_method_test.go @@ -54,7 +54,7 @@ func TestHttpMethod(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpMethod.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/http_uri_suffix_test.go b/rules/aip0234/http_uri_suffix_test.go index 73fcdea58..76fab05d0 100644 --- a/rules/aip0234/http_uri_suffix_test.go +++ b/rules/aip0234/http_uri_suffix_test.go @@ -53,7 +53,7 @@ func TestHttpUriSuffix(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/plural_method_name_test.go b/rules/aip0234/plural_method_name_test.go index 60fcb7973..a1b2a9b43 100644 --- a/rules/aip0234/plural_method_name_test.go +++ b/rules/aip0234/plural_method_name_test.go @@ -88,7 +88,7 @@ func TestMethodPluralResourceName(t *testing.T) { problems := pluralMethodName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/request_message_name_test.go b/rules/aip0234/request_message_name_test.go index 0e66b16d0..6c2517fa4 100644 --- a/rules/aip0234/request_message_name_test.go +++ b/rules/aip0234/request_message_name_test.go @@ -72,7 +72,7 @@ func TestRequestMessageName(t *testing.T) { problems := requestMessageName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/request_parent_field_test.go b/rules/aip0234/request_parent_field_test.go index 7b4cc2b76..81ab38c2e 100644 --- a/rules/aip0234/request_parent_field_test.go +++ b/rules/aip0234/request_parent_field_test.go @@ -72,7 +72,7 @@ func TestParentField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(requestParentField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/request_parent_reference_test.go b/rules/aip0234/request_parent_reference_test.go index 4cb3796fc..d3a5602af 100644 --- a/rules/aip0234/request_parent_reference_test.go +++ b/rules/aip0234/request_parent_reference_test.go @@ -42,7 +42,7 @@ func TestRequestParentReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/request_requests_behavior_test.go b/rules/aip0234/request_requests_behavior_test.go index e93c2e7c5..fa4774ebc 100644 --- a/rules/aip0234/request_requests_behavior_test.go +++ b/rules/aip0234/request_requests_behavior_test.go @@ -42,7 +42,7 @@ func TestRequestRequestsBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestRequestsBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/request_requests_field_test.go b/rules/aip0234/request_requests_field_test.go index f04ef0d32..64823944e 100644 --- a/rules/aip0234/request_requests_field_test.go +++ b/rules/aip0234/request_requests_field_test.go @@ -82,7 +82,7 @@ func TestRequestRequestsField(t *testing.T) { problems := requestRequestsField.Lint(file) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/request_unknown_fields_test.go b/rules/aip0234/request_unknown_fields_test.go index 55983b590..fee5053ed 100644 --- a/rules/aip0234/request_unknown_fields_test.go +++ b/rules/aip0234/request_unknown_fields_test.go @@ -44,7 +44,7 @@ func TestRequestUnknownFields(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestUnknownFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/response_message_name_test.go b/rules/aip0234/response_message_name_test.go index 27babc86a..2b63b24e5 100644 --- a/rules/aip0234/response_message_name_test.go +++ b/rules/aip0234/response_message_name_test.go @@ -72,7 +72,7 @@ func TestResponseMessageName(t *testing.T) { problems := responseMessageName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -123,7 +123,7 @@ func TestLongRunningResponse(t *testing.T) { problems := responseMessageName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0234/response_resource_field_test.go b/rules/aip0234/response_resource_field_test.go index 679428710..f5f226add 100644 --- a/rules/aip0234/response_resource_field_test.go +++ b/rules/aip0234/response_resource_field_test.go @@ -69,7 +69,7 @@ func TestResponseResourceField(t *testing.T) { problems := responseResourceField.Lint(file) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/http_uri_suffix_test.go b/rules/aip0235/http_uri_suffix_test.go index 3e0a8639e..52e472ee2 100644 --- a/rules/aip0235/http_uri_suffix_test.go +++ b/rules/aip0235/http_uri_suffix_test.go @@ -53,7 +53,7 @@ func TestHttpUriSuffix(t *testing.T) { // Run the method, ensure we get what we expect. problems := httpURISuffix.Lint(file) if diff := test.problems.SetDescriptor(file.GetServices()[0].GetMethods()[0]).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/plural_method_name_test.go b/rules/aip0235/plural_method_name_test.go index eb068961f..70087ad94 100644 --- a/rules/aip0235/plural_method_name_test.go +++ b/rules/aip0235/plural_method_name_test.go @@ -88,7 +88,7 @@ func TestMethodPluralResourceName(t *testing.T) { problems := pluralMethodName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/request_message_name_test.go b/rules/aip0235/request_message_name_test.go index ab1f0bccd..b5e8a25af 100644 --- a/rules/aip0235/request_message_name_test.go +++ b/rules/aip0235/request_message_name_test.go @@ -45,7 +45,7 @@ func TestRequestMessageName(t *testing.T) { `, test) m := f.GetServices()[0].GetMethods()[0] if diff := test.problems.SetDescriptor(m).Diff(requestMessageName.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/request_names_behavior_test.go b/rules/aip0235/request_names_behavior_test.go index 7bc0572c0..c2d4209d7 100644 --- a/rules/aip0235/request_names_behavior_test.go +++ b/rules/aip0235/request_names_behavior_test.go @@ -42,7 +42,7 @@ func TestRequestNamesBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNamesBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/request_names_field_test.go b/rules/aip0235/request_names_field_test.go index 64def320a..5dd3ae7b9 100644 --- a/rules/aip0235/request_names_field_test.go +++ b/rules/aip0235/request_names_field_test.go @@ -144,7 +144,7 @@ func TestNamesField(t *testing.T) { problems := requestNamesField.Lint(file) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/request_names_reference_test.go b/rules/aip0235/request_names_reference_test.go index 516d2efa9..c2abf6b62 100644 --- a/rules/aip0235/request_names_reference_test.go +++ b/rules/aip0235/request_names_reference_test.go @@ -42,7 +42,7 @@ func TestRequestNamesReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestNamesReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/request_parent_field_test.go b/rules/aip0235/request_parent_field_test.go index c52078ab3..5c9c884ea 100644 --- a/rules/aip0235/request_parent_field_test.go +++ b/rules/aip0235/request_parent_field_test.go @@ -67,7 +67,7 @@ func TestParentField(t *testing.T) { d = f.GetMessageTypes()[0].GetFields()[0] } if diff := test.problems.SetDescriptor(d).Diff(requestParentField.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/request_parent_reference_test.go b/rules/aip0235/request_parent_reference_test.go index bdcb3fc99..fa97beec0 100644 --- a/rules/aip0235/request_parent_reference_test.go +++ b/rules/aip0235/request_parent_reference_test.go @@ -42,7 +42,7 @@ func TestRequestParentReference(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestParentReference.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/request_requests_behavior_test.go b/rules/aip0235/request_requests_behavior_test.go index b5d1a38b9..d2cf7e864 100644 --- a/rules/aip0235/request_requests_behavior_test.go +++ b/rules/aip0235/request_requests_behavior_test.go @@ -42,7 +42,7 @@ func TestRequestRequestsBehavior(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestRequestsBehavior.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/request_unknown_fields_test.go b/rules/aip0235/request_unknown_fields_test.go index fec061050..259af0486 100644 --- a/rules/aip0235/request_unknown_fields_test.go +++ b/rules/aip0235/request_unknown_fields_test.go @@ -45,7 +45,7 @@ func TestRequestUnknownFields(t *testing.T) { `, test) field := f.GetMessageTypes()[0].GetFields()[0] if diff := test.problems.SetDescriptor(field).Diff(requestUnknownFields.Lint(f)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/response_message_name_test.go b/rules/aip0235/response_message_name_test.go index 33ba525c1..e5b1cbfde 100644 --- a/rules/aip0235/response_message_name_test.go +++ b/rules/aip0235/response_message_name_test.go @@ -115,7 +115,7 @@ func TestResponseMessageName(t *testing.T) { problems := responseMessageName.Lint(file) if diff := test.problems.SetDescriptor(m).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/aip0235/response_resource_field_test.go b/rules/aip0235/response_resource_field_test.go index 5635245ed..45420ff67 100644 --- a/rules/aip0235/response_resource_field_test.go +++ b/rules/aip0235/response_resource_field_test.go @@ -79,7 +79,7 @@ func TestResponseResourceField(t *testing.T) { problems := responseResourceField.Lint(file) if diff := test.problems.SetDescriptor(problemDesc).Diff(problems); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/internal/utils/extension_test.go b/rules/internal/utils/extension_test.go index dea5e4bb7..df3bf9be6 100644 --- a/rules/internal/utils/extension_test.go +++ b/rules/internal/utils/extension_test.go @@ -51,7 +51,7 @@ func TestGetFieldBehavior(t *testing.T) { t.Run(test.fieldName, func(t *testing.T) { f := msg.FindFieldByName(test.fieldName) if diff := cmp.Diff(GetFieldBehavior(f), test.fieldBehaviors); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -85,7 +85,7 @@ func TestGetMethodSignatures(t *testing.T) { `, test) method := f.GetServices()[0].GetMethods()[0] if diff := cmp.Diff(GetMethodSignatures(method), test.want); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/rules/internal/utils/http_test.go b/rules/internal/utils/http_test.go index f8593ef78..964493016 100644 --- a/rules/internal/utils/http_test.go +++ b/rules/internal/utils/http_test.go @@ -122,7 +122,7 @@ func TestGetPlainURI(t *testing.T) { t.Run(test.name, func(t *testing.T) { rule := &HTTPRule{URI: test.uri} if diff := cmp.Diff(rule.GetPlainURI(), test.plainURI); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } @@ -143,7 +143,7 @@ func TestGetVariables(t *testing.T) { t.Run(test.name, func(t *testing.T) { rule := &HTTPRule{URI: test.uri} if diff := cmp.Diff(rule.GetVariables(), test.vars); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } From a415c520286fa1b0374f8234c5c8febdf820d711 Mon Sep 17 00:00:00 2001 From: noahdietz Date: Tue, 5 Nov 2024 10:03:52 -0800 Subject: [PATCH 2/2] chore: fix two more occurrences --- rules/aip0133/method_signature_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/aip0133/method_signature_test.go b/rules/aip0133/method_signature_test.go index 21a013d75..9deb34da4 100644 --- a/rules/aip0133/method_signature_test.go +++ b/rules/aip0133/method_signature_test.go @@ -143,7 +143,7 @@ func TestMethodSignature(t *testing.T) { } `) if diff := (testutils.Problems{}).Diff(methodSignature.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) // Add a separate test for the non-standard resource field case rather than @@ -181,7 +181,7 @@ func TestMethodSignature(t *testing.T) { }, } if diff := want.Diff(methodSignature.Lint(file)); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) }