diff --git a/.editorconfig b/.editorconfig index 693577291b0..6cf42b77607 100644 --- a/.editorconfig +++ b/.editorconfig @@ -122,6 +122,7 @@ resharper_enforce_if_statement_braces_highlighting = error resharper_enforce_lock_statement_braces_highlighting = error resharper_enforce_using_statement_braces_highlighting = error resharper_enforce_while_statement_braces_highlighting = error +resharper_redundant_string_format_call_highlighting = error resharper_unused_variable_highlighting = warning resharper_use_utf8_string_literal_highlighting = error resharper_use_verbatim_string_highlighting = error diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/ErrorHelper.cs b/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/ErrorHelper.cs index 1d507b4c00f..e12bc8c962c 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/ErrorHelper.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/ErrorHelper.cs @@ -96,7 +96,7 @@ public static IExecutionResult OperationNameRequired() public static IError BatchSizeExceeded(int maxBatchSize) => ErrorBuilder.New() - .SetMessage(string.Format(ErrorHelper_BatchSizeExceeded, maxBatchSize)) + .SetMessage(ErrorHelper_BatchSizeExceeded, maxBatchSize) .SetCode(ErrorCodes.Server.RequestInvalid) .Build(); } diff --git a/src/HotChocolate/Core/src/Types/Execution/ThrowHelper.cs b/src/HotChocolate/Core/src/Types/Execution/ThrowHelper.cs index 925033daf15..4f28b3e933a 100644 --- a/src/HotChocolate/Core/src/Types/Execution/ThrowHelper.cs +++ b/src/HotChocolate/Core/src/Types/Execution/ThrowHelper.cs @@ -272,7 +272,7 @@ public static GraphQLException ResolverContext_CannotCastParent( public static GraphQLException OneOfFieldMustBeNonNull( SchemaCoordinate field) => new(ErrorBuilder.New() - .SetMessage(string.Format(ThrowHelper_OneOfFieldMustBeNonNull, field.MemberName)) + .SetMessage(ThrowHelper_OneOfFieldMustBeNonNull, field.MemberName) .SetCode(ErrorCodes.Execution.OneOfFieldMustBeNonNull) .SetExtension(nameof(field), field.ToString()) .Build()); diff --git a/src/HotChocolate/Core/src/Types/Utilities/ThrowHelper.cs b/src/HotChocolate/Core/src/Types/Utilities/ThrowHelper.cs index d39bb46b160..5ef2d2fa2c9 100644 --- a/src/HotChocolate/Core/src/Types/Utilities/ThrowHelper.cs +++ b/src/HotChocolate/Core/src/Types/Utilities/ThrowHelper.cs @@ -734,10 +734,7 @@ public static LeafCoercionException RegexType_InvalidFormat( { return new LeafCoercionException( ErrorBuilder.New() - .SetMessage( - string.Format( - TypeResources.RegexType_InvalidFormat, - name)) + .SetMessage(TypeResources.RegexType_InvalidFormat, name) .SetCode(ErrorCodes.Scalars.InvalidSyntaxFormat) .Build(), type);