From 98472a8ff3c5715eb3b0dc118889f349af9143f4 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 12 May 2021 10:25:41 -0700 Subject: [PATCH 1/5] Make Azure.Core cspell-clean --- .vscode/cspell.json | 42 ++++++++++++++++++- .../src/DynamicContent.cs | 2 +- .../src/DynamicRequest.cs | 2 +- .../src/GeoJson/GeoJsonConverter.cs | 1 + .../Azure.Core.Experimental/src/JsonData.cs | 20 ++++----- .../src/ProtocolClientOptions.cs | 2 +- .../tests/GeoJsonSerializationTests.cs | 1 + sdk/core/Azure.Core.TestFramework/README.md | 4 +- .../src/EntryRecordModel.cs | 2 +- .../DiagnosticScopeValidatingInterceptor.cs | 3 +- .../src/TestAppContextSwitch.cs | 1 + .../src/TestEnvironment.cs | 2 +- .../src/TestRecording.cs | 3 +- sdk/core/Azure.Core/README.md | 2 +- sdk/core/Azure.Core/generate_solution.ps1 | 4 +- sdk/core/Azure.Core/samples/Diagnostics.md | 2 +- sdk/core/Azure.Core/samples/Pipeline.md | 6 +-- sdk/core/Azure.Core/samples/Response.md | 4 +- .../src/Messaging/CloudEventConverter.cs | 1 + .../Pipeline/HttpPipelineSynchronousPolicy.cs | 2 +- .../src/Shared/LightweightPkcs8Decoder.cs | 8 ++-- .../src/Shared/Multipart/MultipartContent.cs | 2 + sdk/core/Azure.Core/tests/Base64UrlTests.cs | 2 + .../AzureBaseBuffersExtensionsTests.cs | 6 +-- .../tests/ClientDiagnosticsTests.cs | 2 +- sdk/core/Azure.Core/tests/ETagTests.cs | 10 ++--- .../tests/HttpEnvironmentProxyTest.cs | 1 + .../tests/LightweightPkcs8DecoderTests.cs | 1 + .../tests/MultipartFormDataContentTests.cs | 4 +- .../Azure.Core/tests/MultipartReaderTests.cs | 1 + sdk/core/Azure.Core/tests/MultipartTests.cs | 2 +- sdk/core/Azure.Core/tests/PemReaderTests.cs | 1 + .../Azure.Core/tests/RecordSessionTests.cs | 8 ++-- .../Azure.Core/tests/RetryPolicyTestBase.cs | 2 +- .../tests/TransportFunctionalTests.cs | 4 +- .../README.md | 2 +- .../README.md | 2 +- .../Microsoft.Azure.Core.Spatial/README.md | 2 +- .../tests/BinaryDataTests.cs | 2 +- 39 files changed, 111 insertions(+), 57 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index c239ab0c45e8..27ca110b377e 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -2,7 +2,7 @@ "version": "0.1", "language": "en_US", "languageId": "csharp", - "dictionaries": ["powershell"], + "dictionaries": ["powershell", "softwareTerms"], "ignorePaths": [ "**/SessionRecords/**", "**/packages/**", @@ -21,11 +21,49 @@ "*.sha512", "*.ico", "*.pri", + "*.trx", + "*.binlog", + "*.log", + "*.sln", + "*.user", ".vscode/cspell.json" ], // cspell is not case sensitive // Sort words alphabetically to make this list easier to use - "words": ["azsdk", "pwsh"], + "words": [ + "apos", + "aragorn", + "azsdk", + "blazor", + "contoso", + "deserializes", + "diagnoser", + "epsg", + "expando", + "finalizer", + "finalizers", + "ints", + "lucene", + "mgmt", + "nunit", + "odata", + "otel", + "overridden", + "parallelization", + "pkcs", + "pwsh", + "referer", + "renormalize", + "retriable", + "sauron's", + "struct", + "structs", + "uints", + "unformattable", + "uninstrumented", + "westus", + "xunit" + ], "overrides": [ { "filename": "**/sdk/formrecognizer/**/*.cs", "words": ["ZhHant"] }, { diff --git a/sdk/core/Azure.Core.Experimental/src/DynamicContent.cs b/sdk/core/Azure.Core.Experimental/src/DynamicContent.cs index be29c2494440..34be1e6fcdad 100644 --- a/sdk/core/Azure.Core.Experimental/src/DynamicContent.cs +++ b/sdk/core/Azure.Core.Experimental/src/DynamicContent.cs @@ -26,7 +26,7 @@ internal DynamicContent(JsonData body) // TODO(matell): When this moves to Azure.Core, this static method should be exposed from the abstract RequestContent class. /// - /// Creates a RequestConent for a given JSON object. + /// Creates a RequestContent for a given JSON object. /// /// The JSON object the request content represents /// A RequestContent which is the UTF-8 encoding of the underlying DynamicJson diff --git a/sdk/core/Azure.Core.Experimental/src/DynamicRequest.cs b/sdk/core/Azure.Core.Experimental/src/DynamicRequest.cs index 9851e48453c1..978384995777 100644 --- a/sdk/core/Azure.Core.Experimental/src/DynamicRequest.cs +++ b/sdk/core/Azure.Core.Experimental/src/DynamicRequest.cs @@ -53,7 +53,7 @@ public override RequestContent? Content /// public dynamic DynamicBody { get => Body; } - // TODO(matell): In Krzysztof's prototype we also took DiagnosticScope as a parameter, do we still need that? + // TODO(matell): In the prototype we also took DiagnosticScope as a parameter, do we still need that? /// /// Creates an instance of that wraps content. /// diff --git a/sdk/core/Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs b/sdk/core/Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs index f0aa37f2e941..2288f5a59881 100644 --- a/sdk/core/Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs +++ b/sdk/core/Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs @@ -23,6 +23,7 @@ public sealed class GeoJsonConverter : JsonConverter private const string TypeProperty = "type"; private const string GeometriesProperty = "geometries"; private const string CoordinatesProperty = "coordinates"; + // cspell:word bbox private const string BBoxProperty = "bbox"; /// diff --git a/sdk/core/Azure.Core.Experimental/src/JsonData.cs b/sdk/core/Azure.Core.Experimental/src/JsonData.cs index 4e2284edace4..c5deae1488c8 100644 --- a/sdk/core/Azure.Core.Experimental/src/JsonData.cs +++ b/sdk/core/Azure.Core.Experimental/src/JsonData.cs @@ -484,7 +484,7 @@ public JsonData SetEmptyArray(string propertyName) /// /// Inserts a new value at the end of an array. /// - /// The value to insert intot he array. + /// The value to insert into the array. /// A of the serialized object. /// /// If the property is not this method throws . @@ -499,7 +499,7 @@ public JsonData Add(object? serializable) /// /// Inserts a new value at the end of an array. /// - /// The value to insert intot he array. + /// The value to insert into the array. /// Options to control the conversion behavior. /// A of the serialized object. /// @@ -515,7 +515,7 @@ public JsonData Add(object? serializable, JsonSerializerOptions options) /// /// Inserts a new value at the end of an array. /// - /// The value to insert intot he array. + /// The value to insert into the array. /// A of the serialized object. /// /// If the property is not this method throws . @@ -530,7 +530,7 @@ public JsonData Add(T[] serializable) /// /// Inserts a new value at the end of an array. /// - /// The value to insert intot he array. + /// The value to insert into the array. /// Options to control the conversion behavior. /// A of the serialized object. /// @@ -589,7 +589,7 @@ public JsonData this[int arrayIndex] /// Gets or sets a value for a given property in an object. /// /// The name of the property in the object to get or set. - /// The value for the given proeprty name. + /// The value for the given property name. /// /// If the property is not this method throws . /// @@ -860,7 +860,7 @@ public JsonValueKind Kind /// /// Returns the number of elements in this array. /// - /// If is not this methods thows . + /// If is not this methods throws . public int Length { get => EnsureArray().Count; @@ -869,7 +869,7 @@ public int Length /// /// Returns the names of all the properties of this object. /// - /// If is not this methods thows . + /// If is not this methods throws . public IEnumerable Properties { get => EnsureObject().Keys; @@ -878,7 +878,7 @@ public IEnumerable Properties /// /// Returns all the elements in this array. /// - /// If is not this methods thows . + /// If is not this methods throws . public IEnumerable Items { get => EnsureArray(); @@ -1305,8 +1305,8 @@ private IEnumerable BuildMembers() } /// - /// The default searlization behavior for is not the behavior we want, we want to use - /// the underlying JSON value that wraps, instead of using the default beahvior for + /// The default serialization behavior for is not the behavior we want, we want to use + /// the underlying JSON value that wraps, instead of using the default behavior for /// POCOs. /// private class JsonConverter : JsonConverter diff --git a/sdk/core/Azure.Core.Experimental/src/ProtocolClientOptions.cs b/sdk/core/Azure.Core.Experimental/src/ProtocolClientOptions.cs index 6e4b5d5a947c..80de07687abf 100644 --- a/sdk/core/Azure.Core.Experimental/src/ProtocolClientOptions.cs +++ b/sdk/core/Azure.Core.Experimental/src/ProtocolClientOptions.cs @@ -4,7 +4,7 @@ namespace Azure.Core { /// - /// A concrete ClientOptions for use by client with no additonal options other than the common ones. + /// A concrete ClientOptions for use by client with no additional options other than the common ones. /// #pragma warning disable AZC0008 // ClientOptions should have a nested enum called ServiceVersion public class ProtocolClientOptions : ClientOptions diff --git a/sdk/core/Azure.Core.Experimental/tests/GeoJsonSerializationTests.cs b/sdk/core/Azure.Core.Experimental/tests/GeoJsonSerializationTests.cs index bdf5235ff538..ddeb55223c58 100644 --- a/sdk/core/Azure.Core.Experimental/tests/GeoJsonSerializationTests.cs +++ b/sdk/core/Azure.Core.Experimental/tests/GeoJsonSerializationTests.cs @@ -32,6 +32,7 @@ public void CanRoundripPoint() [Test] public void CanRoundripBBox() { + // cspell:word bbox var input = $"{{ \"type\": \"Point\", \"coordinates\": [{PS(0)}], \"bbox\": [ {PS(1)}, {PS(2)} ] }}"; var point = AssertRoundtrip(input); diff --git a/sdk/core/Azure.Core.TestFramework/README.md b/sdk/core/Azure.Core.TestFramework/README.md index ec3ada409663..83591462cee1 100644 --- a/sdk/core/Azure.Core.TestFramework/README.md +++ b/sdk/core/Azure.Core.TestFramework/README.md @@ -66,7 +66,7 @@ public class AppConfigurationTestEnvironment : TestEnvironment // Argument is the output name in the test-resources.json public string Endpoint => GetRecordedVariable("APPCONFIGURATION_ENDPOINT"); // Variables retrieved using GetVariable will not be recorded but the method will throw if the variable is not set - public string SystemAssignedVault => GetVariable("IDENTITYTEST_IMDSTEST_SYSTEMASSIGNEDVAULT"); + public string SystemAssignedVault => GetVariable("IDENTITYTEST_TEST_SYSTEMASSIGNEDVAULT"); // Variables retrieved using GetOptionalVariable will not be recorded and the method will return null if variable is not set public string TestPassword => GetOptionalVariable("AZURE_IDENTITY_TEST_PASSWORD") ?? "SANITIZED"; } @@ -468,7 +468,7 @@ Some bindings require code on the customized side to access fields that are gene } ``` -For this to work with tests, your test class must have an `InternalsVisisbleTo` in your `AssemblyInfo.cs`: +For this to work with tests, your test class must have an `InternalsVisibleTo` in your `AssemblyInfo.cs`: ```csharp [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/sdk/core/Azure.Core.TestFramework/src/EntryRecordModel.cs b/sdk/core/Azure.Core.TestFramework/src/EntryRecordModel.cs index e0367a6efb9c..afe9dfb394d6 100644 --- a/sdk/core/Azure.Core.TestFramework/src/EntryRecordModel.cs +++ b/sdk/core/Azure.Core.TestFramework/src/EntryRecordModel.cs @@ -6,7 +6,7 @@ namespace Azure.Core.TestFramework public enum EntryRecordModel { Record, - DontRecord, + DoNotRecord, RecordWithoutRequestBody } } diff --git a/sdk/core/Azure.Core.TestFramework/src/Instrumentation/DiagnosticScopeValidatingInterceptor.cs b/sdk/core/Azure.Core.TestFramework/src/Instrumentation/DiagnosticScopeValidatingInterceptor.cs index bcb957ec3ac2..6307ab6b30bc 100644 --- a/sdk/core/Azure.Core.TestFramework/src/Instrumentation/DiagnosticScopeValidatingInterceptor.cs +++ b/sdk/core/Azure.Core.TestFramework/src/Instrumentation/DiagnosticScopeValidatingInterceptor.cs @@ -27,6 +27,7 @@ public void Intercept(IInvocation invocation) var type = invocation.Method.ReturnType; var isAsyncEnumerable = false; + // cspell:ignore iface foreach (var iface in type.GetInterfaces()) { if (iface.IsGenericType && iface.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) @@ -79,7 +80,7 @@ internal static void WrapAsyncResult(IInvocation invocation, object target, Meth internal static void WrapAsyncResultCore(IInvocation invocation, Type genericType, AsyncCallInterceptor wrap) { - // All this ceremony is not to await the returned Task/ValueTask syncronously + // All this ceremony is not to await the returned Task/ValueTask synchronously // instead we are replacing the invocation.ReturnValue with the ValidateDiagnosticScope task // but we need to make sure the types match if (genericType == typeof(Task<>)) diff --git a/sdk/core/Azure.Core.TestFramework/src/TestAppContextSwitch.cs b/sdk/core/Azure.Core.TestFramework/src/TestAppContextSwitch.cs index f3875ba5fc35..9bfbe073d248 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestAppContextSwitch.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestAppContextSwitch.cs @@ -51,6 +51,7 @@ internal override void InitValues() } _switches = info.GetValue(null); // initialize the switches, which can be null until the first switch is set. + // cspell:disable-next-line var initSwitch = "azuresdktestinitswitch"; _originalValues[initSwitch] = null; AppContext.SetSwitch(initSwitch, false); diff --git a/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs b/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs index 8f7377a8040e..71ba68f462dd 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs @@ -177,7 +177,7 @@ public TokenCredential Credential } /// - /// Returns whether environment is ready to use. Should be overriden to provide service specific sampling scenario. + /// Returns whether environment is ready to use. Should be overridden to provide service specific sampling scenario. /// The test framework will wait until this returns true before starting tests. /// Use this place to hook up logic that polls if eventual consistency has happened. /// diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index 4378d279bf32..32ef901bd84c 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -17,6 +17,7 @@ public class TestRecording : IDisposable { private const string RandomSeedVariableKey = "RandomSeed"; private const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + // cspell: disable-next-line private const string charsLower = "abcdefghijklmnopqrstuvwxyz0123456789"; internal const string DateTimeOffsetNowVariableKey = "DateTimeOffsetNow"; @@ -314,7 +315,7 @@ public void DisableIdReuse() public DisableRecordingScope DisableRecording() { - return new DisableRecordingScope(this, EntryRecordModel.DontRecord); + return new DisableRecordingScope(this, EntryRecordModel.DoNotRecord); } public DisableRecordingScope DisableRequestBodyRecording() diff --git a/sdk/core/Azure.Core/README.md b/sdk/core/Azure.Core/README.md index 080350914f59..3778ab8e2acc 100644 --- a/sdk/core/Azure.Core/README.md +++ b/sdk/core/Azure.Core/README.md @@ -229,7 +229,7 @@ Explore and install [available Azure SDK libraries](https://azure.github.io/azur This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][code_of_conduct_faq] or contact opencode@microsoft.com with any additional questions or comments. diff --git a/sdk/core/Azure.Core/generate_solution.ps1 b/sdk/core/Azure.Core/generate_solution.ps1 index b5fef663efc3..223eafefef63 100644 --- a/sdk/core/Azure.Core/generate_solution.ps1 +++ b/sdk/core/Azure.Core/generate_solution.ps1 @@ -4,7 +4,7 @@ $RepoRoot = Resolve-Path $PSScriptRoot\..\..\.. $ObjDirectory = "$RepoRoot\artifacts\obj"; dotnet restore $RepoRoot\eng\service.proj -pushd $PSScriptRoot +Push-Location $PSScriptRoot try { @@ -39,5 +39,5 @@ try } finally { - popd + Pop-Location } \ No newline at end of file diff --git a/sdk/core/Azure.Core/samples/Diagnostics.md b/sdk/core/Azure.Core/samples/Diagnostics.md index be9bdc71dc78..ada438817ace 100644 --- a/sdk/core/Azure.Core/samples/Diagnostics.md +++ b/sdk/core/Azure.Core/samples/Diagnostics.md @@ -5,7 +5,7 @@ ## Logging Azure SDKs produce various log messages that include information about: -1. Requests and reponses +1. Requests and responses 2. Authentication attempts 3. Retries diff --git a/sdk/core/Azure.Core/samples/Pipeline.md b/sdk/core/Azure.Core/samples/Pipeline.md index a5e234476034..51e7c152e706 100644 --- a/sdk/core/Azure.Core/samples/Pipeline.md +++ b/sdk/core/Azure.Core/samples/Pipeline.md @@ -20,7 +20,7 @@ options.AddPolicy(new StopwatchPolicy(), HttpPipelinePosition.PerRetry); ## Implementing a policy -To implement a policy create a class deriving from `HttpPipelinePolicy` and overide `ProcessAsync` and `Process` methods. Request can be acessed via `message.Request`. Response is accessible via `message.Response` but only after `ProcessNextAsync`/`ProcessNext` was called. +To implement a policy create a class deriving from `HttpPipelinePolicy` and overide `ProcessAsync` and `Process` methods. Request can be accessed via `message.Request`. Response is accessible via `message.Response` but only after `ProcessNextAsync`/`ProcessNext` was called. ```C# Snippet:StopwatchPolicy public class StopwatchPolicy : HttpPipelinePolicy @@ -51,9 +51,9 @@ public class StopwatchPolicy : HttpPipelinePolicy } ``` -## Implementing a syncronous policy +## Implementing a synchronous policy -If your policy doesn't do any asyncronous operations you can derive from `HttpPipelineSynchronousPolicy` and override `OnSendingRequest` or `OnResponseReceived` method. +If your policy doesn't do any asynchronous operations you can derive from `HttpPipelineSynchronousPolicy` and override `OnSendingRequest` or `OnResponseReceived` method. ```C# Snippet:SyncPolicy public class CustomRequestPolicy : HttpPipelineSynchronousPolicy diff --git a/sdk/core/Azure.Core/samples/Response.md b/sdk/core/Azure.Core/samples/Response.md index 143337639483..547a9384e295 100644 --- a/sdk/core/Azure.Core/samples/Response.md +++ b/sdk/core/Azure.Core/samples/Response.md @@ -6,7 +6,7 @@ Most client methods return one of the following types: - `Response` - an HTTP response - `Response` - a value and HTTP response - `Pageable` - a collection of values retrieved in pages - - `AsyncPageable` - a collection of values asyncrounosly retrieved in pages + - `AsyncPageable` - a collection of values asynchronously retrieved in pages - `*Operation` - a long-running operation see [long running operation samples](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/LongRunningOperations.md) ## Accessing HTTP response propreties @@ -129,7 +129,7 @@ await foreach (Page page in allSecretProperties.AsPages()) ## Iterating over pageable -`Pageable` is a syncronous version of `AsyncPageable`, it can be used with a normal `foreach` loop. +`Pageable` is a synchronous version of `AsyncPageable`, it can be used with a normal `foreach` loop. ```C# Snippet:Pageable // call a service method, which returns Pageable diff --git a/sdk/core/Azure.Core/src/Messaging/CloudEventConverter.cs b/sdk/core/Azure.Core/src/Messaging/CloudEventConverter.cs index 9d2e7636bdad..ab9505f5d6b9 100644 --- a/sdk/core/Azure.Core/src/Messaging/CloudEventConverter.cs +++ b/sdk/core/Azure.Core/src/Messaging/CloudEventConverter.cs @@ -132,6 +132,7 @@ internal static CloudEvent DeserializeCloudEvent(JsonElement element, bool skipV } if (cloudEvent.SpecVersion != "1.0") { + // cspell:word specverion if (cloudEvent.SpecVersion == null) { throw new ArgumentException( diff --git a/sdk/core/Azure.Core/src/Pipeline/HttpPipelineSynchronousPolicy.cs b/sdk/core/Azure.Core/src/Pipeline/HttpPipelineSynchronousPolicy.cs index cc221578f863..6c9c958be733 100644 --- a/sdk/core/Azure.Core/src/Pipeline/HttpPipelineSynchronousPolicy.cs +++ b/sdk/core/Azure.Core/src/Pipeline/HttpPipelineSynchronousPolicy.cs @@ -49,7 +49,7 @@ async ValueTask ProcessAsyncInner(HttpMessage message, ReadOnlyMemory bcharsnospace // bchars := bcharsnospace / " " // bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / "+" / "_" / "," / "-" / "." / "/" / ":" / "=" / "?" + // cspell:enable if (boundary.Length > 70) { throw new ArgumentOutOfRangeException(nameof(boundary), boundary, $"The field cannot be longer than {70} characters."); diff --git a/sdk/core/Azure.Core/tests/Base64UrlTests.cs b/sdk/core/Azure.Core/tests/Base64UrlTests.cs index c89f15719b6a..f3082d07370e 100644 --- a/sdk/core/Azure.Core/tests/Base64UrlTests.cs +++ b/sdk/core/Azure.Core/tests/Base64UrlTests.cs @@ -101,11 +101,13 @@ public string GenerateRandomString(Random rand, int length) private static readonly (string, string)[] s_staticValues = new (string, string)[] { + //cSpell:disable ("foo", "Zm9v"), ("", "PGZvbyE-"), ("<>", "PGZvbyE_Pjw8Zm9vPz4-"), ("<>foo", "PGZvbyE_Pjw8Zm9vPz4-Zm9v") + //cSpell:enable }; [Test] diff --git a/sdk/core/Azure.Core/tests/Buffers/AzureBaseBuffersExtensionsTests.cs b/sdk/core/Azure.Core/tests/Buffers/AzureBaseBuffersExtensionsTests.cs index a3389785bc43..d43c5486749d 100644 --- a/sdk/core/Azure.Core/tests/Buffers/AzureBaseBuffersExtensionsTests.cs +++ b/sdk/core/Azure.Core/tests/Buffers/AzureBaseBuffersExtensionsTests.cs @@ -100,7 +100,7 @@ public async Task WriteNativeMemorySequenceEmptySequenceAndLargeSegment() using MemoryStream ms = new MemoryStream(); // Put some data in memory - PopulatMemoryWithData(totalNativeMemory.Memory); + PopulateMemoryWithData(totalNativeMemory.Memory); // create the individual segments BufferSegment start = new BufferSegment(totalNativeMemory.Memory.Slice(0, 0)); // have an empty start segment @@ -123,7 +123,7 @@ private static void CheckMemoryStreamContent(MemoryStream ms) private static ReadOnlySequence CreateSequenceFromMemory(Memory totalMemory) { - PopulatMemoryWithData(totalMemory); + PopulateMemoryWithData(totalMemory); // create the individual segments BufferSegment start = new BufferSegment(totalMemory.Slice(0, 2)); @@ -135,7 +135,7 @@ private static ReadOnlySequence CreateSequenceFromMemory(Memory tota return new ReadOnlySequence(start, 0, last, 2); // the last segment has length 2 } - private static void PopulatMemoryWithData(Memory totalMemory) + private static void PopulateMemoryWithData(Memory totalMemory) { // populate the memory with some data. for (byte i = 0; i < totalMemory.Length; i++) diff --git a/sdk/core/Azure.Core/tests/ClientDiagnosticsTests.cs b/sdk/core/Azure.Core/tests/ClientDiagnosticsTests.cs index ea9bf2f2dbf0..542866114c45 100644 --- a/sdk/core/Azure.Core/tests/ClientDiagnosticsTests.cs +++ b/sdk/core/Azure.Core/tests/ClientDiagnosticsTests.cs @@ -188,7 +188,7 @@ public void FailedStopsActivityAndWritesExceptionEvent() } [Test] - public void NoopsWhenDisabled() + public void NoOpsWhenDisabled() { DiagnosticScopeFactory clientDiagnostics = new DiagnosticScopeFactory("Azure.Clients", "Microsoft.Azure.Core.Cool.Tests", false); DiagnosticScope scope = clientDiagnostics.CreateScope(""); diff --git a/sdk/core/Azure.Core/tests/ETagTests.cs b/sdk/core/Azure.Core/tests/ETagTests.cs index f19568d1020b..bb12aa860d01 100644 --- a/sdk/core/Azure.Core/tests/ETagTests.cs +++ b/sdk/core/Azure.Core/tests/ETagTests.cs @@ -80,11 +80,11 @@ public void EqualityMembersDefault() } [Theory] - [TestCase("lalala")] - [TestCase("\"lalala")] - [TestCase("lalala\"")] - [TestCase("W/\"lalala")] - [TestCase("W/lalala\"")] + [TestCase("hello")] + [TestCase("\"hello")] + [TestCase("hello\"")] + [TestCase("W/\"hello")] + [TestCase("W/hello\"")] public void ThrowsForEtagsWithoutQuotes(string value) { Assert.Throws(() => ETag.Parse(value)); diff --git a/sdk/core/Azure.Core/tests/HttpEnvironmentProxyTest.cs b/sdk/core/Azure.Core/tests/HttpEnvironmentProxyTest.cs index eb3ddfb17e6e..355b160ceea7 100644 --- a/sdk/core/Azure.Core/tests/HttpEnvironmentProxyTest.cs +++ b/sdk/core/Azure.Core/tests/HttpEnvironmentProxyTest.cs @@ -101,6 +101,7 @@ public void HttpProxy_EnvironmentProxy_Loaded() [TestCase("foo:Pass$!#\\.$@127.0.0.1:3128", "127.0.0.1", "3128", "foo", "Pass$!#\\.$")] [TestCase("[::1]", "[::1]", "80", null, null)] [TestCase("domain\\foo:bar@1.1.1.1", "1.1.1.1", "80", "foo", "bar")] + // cspell:disable-next-line [TestCase("domain%5Cfoo:bar@1.1.1.1", "1.1.1.1", "80", "foo", "bar")] [TestCase("HTTP://ABC.COM/", "abc.com", "80", null, null)] [TestCase("http://10.30.62.64:7890/", "10.30.62.64", "7890", null, null)] diff --git a/sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs b/sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs index 6e39a399944a..630e9df0130a 100644 --- a/sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs +++ b/sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs @@ -175,6 +175,7 @@ public void GetRSAPrivateKeyOid() [Test] public void GetECDsaPrivateKeyImportedOid() { + // cspell:word Secp byte[] data = Convert.FromBase64String(EcSecp256k1PrivateKey); Assert.AreEqual("1.2.840.10045.2.1", LightweightPkcs8Decoder.DecodePrivateKeyOid(data)); } diff --git a/sdk/core/Azure.Core/tests/MultipartFormDataContentTests.cs b/sdk/core/Azure.Core/tests/MultipartFormDataContentTests.cs index eab257750cb7..5319e336ff7c 100644 --- a/sdk/core/Azure.Core/tests/MultipartFormDataContentTests.cs +++ b/sdk/core/Azure.Core/tests/MultipartFormDataContentTests.cs @@ -57,10 +57,12 @@ public void Ctor_BadBoundary_ThrowsArgumentException() [Test] public void Ctor_GoodBoundary_Success() { + // cSpell:disable // RFC 2046 Section 5.1.1 // boundary := 0*69 bcharsnospace // bchars := bcharsnospace / " " // bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / "+" / "_" / "," / "-" / "." / "/" / ":" / "=" / "?" + // cSpell:enable new MultipartFormDataContent("09"); new MultipartFormDataContent("az"); new MultipartFormDataContent("AZ"); @@ -260,7 +262,7 @@ public async Task Serialize_QuotedName_Success() } [Test] - public void Dispose_Empty_Sucess() + public void Dispose_Empty_Success() { var content = new MultipartFormDataContent(); content.Dispose(); diff --git a/sdk/core/Azure.Core/tests/MultipartReaderTests.cs b/sdk/core/Azure.Core/tests/MultipartReaderTests.cs index 58d06724944c..4f733be13b66 100644 --- a/sdk/core/Azure.Core/tests/MultipartReaderTests.cs +++ b/sdk/core/Azure.Core/tests/MultipartReaderTests.cs @@ -374,6 +374,7 @@ public async Task MultipartReader_ReadInvalidUtf8SurrogateHeader_ReplacementChar var section = await reader.ReadNextSectionAsync(); Assert.NotNull(section); Assert.That(section.Headers.Count, Is.EqualTo(1)); + // cspell:word FFFDU #if NET5_0 //https://github.com/dotnet/runtime/issues/29017 Assert.That(section.Headers["Content-Disposition"][0], Is.EqualTo("form-data; name=\"text\" filename=\"a\uFFFD\uFFFDU.txt\"")); #else diff --git a/sdk/core/Azure.Core/tests/MultipartTests.cs b/sdk/core/Azure.Core/tests/MultipartTests.cs index ca7e3b37d0d5..4f14b320d288 100644 --- a/sdk/core/Azure.Core/tests/MultipartTests.cs +++ b/sdk/core/Azure.Core/tests/MultipartTests.cs @@ -168,7 +168,7 @@ public async Task SendMultipartData() const string ApplicationJsonOdata = "application/json; odata=nometadata"; const string DataServiceVersion = "DataServiceVersion"; const string Three0 = "3.0"; - const string Host = "myaccount.table.core.windows.net"; + const string Host = "MyAccount.table.core.windows.net"; using Request request = new MockRequest { diff --git a/sdk/core/Azure.Core/tests/PemReaderTests.cs b/sdk/core/Azure.Core/tests/PemReaderTests.cs index 7f92df16edcb..fdb2f1a380ac 100644 --- a/sdk/core/Azure.Core/tests/PemReaderTests.cs +++ b/sdk/core/Azure.Core/tests/PemReaderTests.cs @@ -43,6 +43,7 @@ public void ReadsPrivateKey(string lineEnding) $"g0uFtPoHfnUG/jSQYk4R18vucCrVGaqDdzaBR7zxEQKBgCEqovhMGJ1xOrkzetBB{lineEnding}" + $"+zgh5zJbAWx5DQk5ZdmAcAnEeqconM2yhFB636wC07UbeAZaQmhB5kQYMOuiCstt{lineEnding}" + $"30sdQlNG9EGdqNsoVn/363Cg1iKJy4JU5uW/5kjh4UfBZG6DDwjLK88ZWh0OHPRV{lineEnding}" + +// cspell:disable-next-line $"h8q0or9YnvqnVrELMR8cjUkZ{lineEnding}" + $"-----END PRIVATE KEY-----"; diff --git a/sdk/core/Azure.Core/tests/RecordSessionTests.cs b/sdk/core/Azure.Core/tests/RecordSessionTests.cs index c0ee6b14b6f2..18442514efe2 100644 --- a/sdk/core/Azure.Core/tests/RecordSessionTests.cs +++ b/sdk/core/Azure.Core/tests/RecordSessionTests.cs @@ -159,7 +159,7 @@ public void RecordMatcherIgnoresValuesOfIgnoredHeaders() { "Request-Id", new[] { "Non-Random value"}}, { "Date", new[] { "Fri, 05 Nov 2020 02:42:26 GMT"} }, { "x-ms-date", new[] { "Fri, 05 Nov 2020 02:42:26 GMT"} }, - { "x-ms-client-request-id", new[] {"non random requestid"} }, + { "x-ms-client-request-id", new[] {"non random request id"} }, { "User-Agent", new[] {"non random sdk"} }, { "traceparent", new[] { "non random traceparent" } } } @@ -179,7 +179,7 @@ public void RecordMatcherIgnoresValuesOfIgnoredHeaders() { "Request-Id", new[] { "Some Random value"}}, { "Date", new[] { "Fri, 06 Nov 2020 02:42:26 GMT"} }, { "x-ms-date", new[] { "Fri, 06 Nov 2020 02:42:26 GMT"} }, - { "x-ms-client-request-id", new[] {"some random requestid"} }, + { "x-ms-client-request-id", new[] {"some random request id"} }, { "User-Agent", new[] {"some random sdk"} }, { "traceparent", new[] {"some random traceparent"} } } @@ -262,7 +262,7 @@ public void RecordMatcheRequiresPresenceOfIgnoredHeaders() { Headers = { - { "x-ms-client-request-id", new[] {"some random requestid"} }, + { "x-ms-client-request-id", new[] {"some random request id"} }, { "User-Agent", new[] {"some random sdk"} }, { "traceparent", new[] {"some random traceparent"} } } @@ -278,7 +278,7 @@ public void RecordMatcheRequiresPresenceOfIgnoredHeaders() " is absent in record, value " + Environment.NewLine + " is absent in record, value " + Environment.NewLine + " is absent in request, value " + Environment.NewLine + - " is absent in request, value " + Environment.NewLine + + " is absent in request, value " + Environment.NewLine + "Body differences:" + Environment.NewLine, exception.Message); } diff --git a/sdk/core/Azure.Core/tests/RetryPolicyTestBase.cs b/sdk/core/Azure.Core/tests/RetryPolicyTestBase.cs index 0a28732d3261..1bdee4dc8825 100644 --- a/sdk/core/Azure.Core/tests/RetryPolicyTestBase.cs +++ b/sdk/core/Azure.Core/tests/RetryPolicyTestBase.cs @@ -45,7 +45,7 @@ public async Task DoesNotExceedRetryCount() } [Test] - public async Task OnlyRetriesRetriebleCodes() + public async Task OnlyRetriesRetriableCodes() { var responseClassifier = new MockResponseClassifier(retriableCodes: new[] { 500 }); (HttpPipelinePolicy policy, AsyncGate gate) = CreateRetryPolicy(maxRetries: 3); diff --git a/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs b/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs index ff43188b71bb..2764114d5a39 100644 --- a/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs +++ b/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs @@ -88,7 +88,7 @@ public async Task SettingHeaderOverridesDefaultContentLength() } [Test] - public async Task CanSetContentLenghtOverMaxInt() + public async Task CanSetContentLengthOverMaxInt() { long contentLength = 0; using TestServer testServer = new TestServer( @@ -575,7 +575,7 @@ public async Task RequestAndResponseHasRequestId() } [Test] - public async Task RequestIdCanBeOverriden() + public async Task RequestIdCanBeOverridden() { using TestServer testServer = new TestServer(context => { }); var transport = GetTransport(); diff --git a/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md b/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md index 803252db0fd7..59e13bf28f90 100644 --- a/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md +++ b/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md @@ -111,7 +111,7 @@ You can add or remove converters, set the `ContractResolver`, or any other membe This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][code_of_conduct_faq] or contact opencode@microsoft.com with any additional questions or comments. diff --git a/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/README.md b/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/README.md index 08cad0bc57f5..1ee009082ebb 100644 --- a/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/README.md +++ b/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/README.md @@ -85,7 +85,7 @@ https://www.bing.com/maps?cp=46.85287~-121.76044&sp=point.46.85287_-121.76044_Mo This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][code_of_conduct_faq] or contact opencode@microsoft.com with any additional questions or comments. diff --git a/sdk/core/Microsoft.Azure.Core.Spatial/README.md b/sdk/core/Microsoft.Azure.Core.Spatial/README.md index c4eb1498ffbc..9046d279da78 100644 --- a/sdk/core/Microsoft.Azure.Core.Spatial/README.md +++ b/sdk/core/Microsoft.Azure.Core.Spatial/README.md @@ -85,7 +85,7 @@ https://www.bing.com/maps?cp=46.85287~-121.76044&sp=point.46.85287_-121.76044_Mo This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][code_of_conduct_faq] or contact opencode@microsoft.com with any additional questions or comments. diff --git a/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs b/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs index 1df80179ec9a..8c7da0a33e98 100644 --- a/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs +++ b/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs @@ -100,7 +100,7 @@ public async Task ToStreamIsMutatedWhenCustomerOwnsBuffer() Stream stream = data.ToStream(); buffer[0] = (byte)'z'; StreamReader sr = new StreamReader(stream); - Assert.Equal("zome data", await sr.ReadToEndAsync()); + Assert.Equal("some data", await sr.ReadToEndAsync()); } [Fact] From 75ac54a8729db6d91ab2f864eb6cc8fa6acc0e16 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 12 May 2021 10:33:19 -0700 Subject: [PATCH 2/5] more --- .../tests/GeoJsonSerializationTests.cs | 2 +- .../Azure.Core/src/Shared/LightweightPkcs8Decoder.cs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sdk/core/Azure.Core.Experimental/tests/GeoJsonSerializationTests.cs b/sdk/core/Azure.Core.Experimental/tests/GeoJsonSerializationTests.cs index ddeb55223c58..3445a1f7267f 100644 --- a/sdk/core/Azure.Core.Experimental/tests/GeoJsonSerializationTests.cs +++ b/sdk/core/Azure.Core.Experimental/tests/GeoJsonSerializationTests.cs @@ -32,7 +32,7 @@ public void CanRoundripPoint() [Test] public void CanRoundripBBox() { - // cspell:word bbox + // cspell:ignore bbox var input = $"{{ \"type\": \"Point\", \"coordinates\": [{PS(0)}], \"bbox\": [ {PS(1)}, {PS(2)} ] }}"; var point = AssertRoundtrip(input); diff --git a/sdk/core/Azure.Core/src/Shared/LightweightPkcs8Decoder.cs b/sdk/core/Azure.Core/src/Shared/LightweightPkcs8Decoder.cs index 1addf6f84c61..1f9fb2806265 100644 --- a/sdk/core/Azure.Core/src/Shared/LightweightPkcs8Decoder.cs +++ b/sdk/core/Azure.Core/src/Shared/LightweightPkcs8Decoder.cs @@ -145,15 +145,16 @@ internal static string ReadObjectIdentifier(byte[] data, ref int offset) int max = end + 1; if (max <= i + 4) { - int accumulator = 0; + // cspell:ignore accum + int accum = 0; for (idx = i; idx < max; idx++) { val = data[idx]; - accumulator <<= 7; - accumulator |= (byte)(val & 0x7f); + accum <<= 7; + accum |= (byte)(val & 0x7f); } - ret.Append(accumulator); + ret.Append(accum); i = end; } else From 51eca0bb97321aa02a43a66b1c6b48740b56eaea Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 12 May 2021 11:06:55 -0700 Subject: [PATCH 3/5] fb --- .vscode/cspell.json | 7 ++++--- sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md | 2 +- .../tests/Samples/Readme.cs | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 27ca110b377e..28641ca07d6e 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -32,7 +32,6 @@ // Sort words alphabetically to make this list easier to use "words": [ "apos", - "aragorn", "azsdk", "blazor", "contoso", @@ -55,7 +54,6 @@ "referer", "renormalize", "retriable", - "sauron's", "struct", "structs", "uints", @@ -65,7 +63,10 @@ "xunit" ], "overrides": [ - { "filename": "**/sdk/formrecognizer/**/*.cs", "words": ["ZhHant"] }, + { + "filename": "**/sdk/formrecognizer/**/*.cs", + "words": ["ZhHant"] + }, { "filename": "**/eng/pipelines/templates/jobs/ci.yml", "words": ["warnaserror"] diff --git a/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md b/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md index 59e13bf28f90..f917cea2da39 100644 --- a/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md +++ b/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/README.md @@ -79,7 +79,7 @@ foreach (SearchResult result in results.Value.GetResults()) ``` If searching an index full of movies, the following may be printed: - + ```text The Lord of the Rings: The Return of the King Gandalf and Aragorn lead the World of Men against Sauron's army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring. diff --git a/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/tests/Samples/Readme.cs b/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/tests/Samples/Readme.cs index b515b209648a..5922f32c5934 100644 --- a/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/tests/Samples/Readme.cs +++ b/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/tests/Samples/Readme.cs @@ -20,6 +20,7 @@ public class Readme [Test] public void SearchSample() { + // cspell:word Aragorn Sauron's MockResponse response = new MockResponse(200); response.SetContent(@"{ ""value"": [ From d8a051ceacaf82ab8595c63f100f96cda42ba58c Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 12 May 2021 11:15:49 -0700 Subject: [PATCH 4/5] fb --- .vscode/cspell.json | 3 +-- .../Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs | 2 +- sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs | 2 +- sdk/core/Azure.Core/tests/MultipartReaderTests.cs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 28641ca07d6e..117b5722194e 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -2,7 +2,7 @@ "version": "0.1", "language": "en_US", "languageId": "csharp", - "dictionaries": ["powershell", "softwareTerms"], + "dictionaries": ["powershell", "softwareTerms", "csharp"], "ignorePaths": [ "**/SessionRecords/**", "**/packages/**", @@ -54,7 +54,6 @@ "referer", "renormalize", "retriable", - "struct", "structs", "uints", "unformattable", diff --git a/sdk/core/Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs b/sdk/core/Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs index 2288f5a59881..00dd4b93dc72 100644 --- a/sdk/core/Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs +++ b/sdk/core/Azure.Core.Experimental/src/GeoJson/GeoJsonConverter.cs @@ -23,7 +23,7 @@ public sealed class GeoJsonConverter : JsonConverter private const string TypeProperty = "type"; private const string GeometriesProperty = "geometries"; private const string CoordinatesProperty = "coordinates"; - // cspell:word bbox + // cspell:ignore bbox private const string BBoxProperty = "bbox"; /// diff --git a/sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs b/sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs index 630e9df0130a..2cf65eef7629 100644 --- a/sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs +++ b/sdk/core/Azure.Core/tests/LightweightPkcs8DecoderTests.cs @@ -175,7 +175,7 @@ public void GetRSAPrivateKeyOid() [Test] public void GetECDsaPrivateKeyImportedOid() { - // cspell:word Secp + // cspell:ignore Secp byte[] data = Convert.FromBase64String(EcSecp256k1PrivateKey); Assert.AreEqual("1.2.840.10045.2.1", LightweightPkcs8Decoder.DecodePrivateKeyOid(data)); } diff --git a/sdk/core/Azure.Core/tests/MultipartReaderTests.cs b/sdk/core/Azure.Core/tests/MultipartReaderTests.cs index 4f733be13b66..0b6666f4e3df 100644 --- a/sdk/core/Azure.Core/tests/MultipartReaderTests.cs +++ b/sdk/core/Azure.Core/tests/MultipartReaderTests.cs @@ -374,7 +374,7 @@ public async Task MultipartReader_ReadInvalidUtf8SurrogateHeader_ReplacementChar var section = await reader.ReadNextSectionAsync(); Assert.NotNull(section); Assert.That(section.Headers.Count, Is.EqualTo(1)); - // cspell:word FFFDU + // cspell:ignore FFFDU #if NET5_0 //https://github.com/dotnet/runtime/issues/29017 Assert.That(section.Headers["Content-Disposition"][0], Is.EqualTo("form-data; name=\"text\" filename=\"a\uFFFD\uFFFDU.txt\"")); #else From d5960829ef96a0227fb4d30add608f26a1291d18 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 12 May 2021 12:24:14 -0700 Subject: [PATCH 5/5] tests --- sdk/core/Azure.Core/tests/MultipartTests.cs | 3 ++- sdk/core/System.Memory.Data/tests/BinaryDataTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sdk/core/Azure.Core/tests/MultipartTests.cs b/sdk/core/Azure.Core/tests/MultipartTests.cs index 4f14b320d288..0967fb6ea836 100644 --- a/sdk/core/Azure.Core/tests/MultipartTests.cs +++ b/sdk/core/Azure.Core/tests/MultipartTests.cs @@ -168,7 +168,8 @@ public async Task SendMultipartData() const string ApplicationJsonOdata = "application/json; odata=nometadata"; const string DataServiceVersion = "DataServiceVersion"; const string Three0 = "3.0"; - const string Host = "MyAccount.table.core.windows.net"; + // cspell:ignore myaccount + const string Host = "myaccount.table.core.windows.net"; using Request request = new MockRequest { diff --git a/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs b/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs index 8c7da0a33e98..6e26cdc0e8e3 100644 --- a/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs +++ b/sdk/core/System.Memory.Data/tests/BinaryDataTests.cs @@ -98,9 +98,9 @@ public async Task ToStreamIsMutatedWhenCustomerOwnsBuffer() byte[] buffer = Encoding.UTF8.GetBytes("some data"); BinaryData data = BinaryData.FromBytes(buffer); Stream stream = data.ToStream(); - buffer[0] = (byte)'z'; + buffer[0] = (byte)'t'; StreamReader sr = new StreamReader(stream); - Assert.Equal("some data", await sr.ReadToEndAsync()); + Assert.Equal("tome data", await sr.ReadToEndAsync()); } [Fact]