From 99d970bb9855274ba7a3d0324b02cf6cf55efd5d Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Tue, 13 Feb 2024 14:23:51 -0800 Subject: [PATCH] [.NET Analyzers] Add new approved namespace (#7674) The focus of these changes is to add the "Azure.Compute" namespace to the approved list, per Krzysztof's approval for use in the `Azure.Compute.Batch` package. --- .../Azure.ClientSdk.Analyzers.Tests/AZC0001Tests.cs | 2 +- .../ClientAssemblyNamespaceAnalyzer.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers.Tests/AZC0001Tests.cs b/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers.Tests/AZC0001Tests.cs index ede28562a94..ad7b1e26c12 100644 --- a/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers.Tests/AZC0001Tests.cs +++ b/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers.Tests/AZC0001Tests.cs @@ -20,7 +20,7 @@ public class Program { } var diagnostic = Verifier.Diagnostic("AZC0001") .WithMessage("Namespace 'RandomNamespace' shouldn't contain public types. Use one of the following pre-approved namespace groups (https://azure.github.io/azure-sdk/registered_namespaces.html):" + - " Azure.AI, Azure.Analytics, Azure.Communication, Azure.Containers, Azure.Core.Expressions, Azure.Data, Azure.Developer, Azure.DigitalTwins, Azure.Identity, Azure.IoT, Azure.Learn, Azure.Management, Azure.Media, Azure.Messaging, Azure.MixedReality, Azure.Monitor, Azure.ResourceManager, Azure.Search, Azure.Security, Azure.Storage, Azure.Template, Microsoft.Extensions.Azure") + " Azure.AI, Azure.Analytics, Azure.Communication, Azure.Compute, Azure.Containers, Azure.Core.Expressions, Azure.Data, Azure.Developer, Azure.DigitalTwins, Azure.Identity, Azure.IoT, Azure.Learn, Azure.Management, Azure.Media, Azure.Messaging, Azure.MixedReality, Azure.Monitor, Azure.ResourceManager, Azure.Search, Azure.Security, Azure.Storage, Azure.Template, Microsoft.Extensions.Azure") .WithSpan(2, 11, 2, 26); await Verifier.VerifyAnalyzerAsync(code, diagnostic); diff --git a/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers/ClientAssemblyNamespaceAnalyzer.cs b/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers/ClientAssemblyNamespaceAnalyzer.cs index d7a9cac1500..c1d932e26f1 100644 --- a/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers/ClientAssemblyNamespaceAnalyzer.cs +++ b/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers/ClientAssemblyNamespaceAnalyzer.cs @@ -15,6 +15,7 @@ public class ClientAssemblyNamespaceAnalyzer : SymbolAnalyzerBase "Azure.AI", "Azure.Analytics", "Azure.Communication", + "Azure.Compute", "Azure.Containers", "Azure.Core.Expressions", "Azure.Data",