Skip to content

Enable IDE0005 analyzer in the build #49080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ dotnet_diagnostic.CA1304.severity = error
# CA1310: Specify StringComparison for correctness
dotnet_diagnostic.CA1310.severity = error

# TODO: remove this - https://github.com/dotnet/aspnetcore/issues/47912
dotnet_diagnostic.EnableGenerateDocumentationFile.severity = none

# Referencing types that are defined in M.CA.Workspaces is not appropriate
# for analyzers or source generators that might be invoked from a command
# line build because editor-specific types in M.CA.Workspaces are not
Expand All @@ -29,3 +26,4 @@ dotnet_diagnostic.EnableGenerateDocumentationFile.severity = none
# to see if they are from a Workspaces assembly so it will take longer than the
# greedier (and stricter) check for references overall.
roslyn_correctness.assembly_reference_validation = relaxed

12 changes: 12 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
<SuppressDependenciesWhenPacking Condition="'$(SuppressDependenciesWhenPacking)' == '' AND '$(IsAnalyzersProject)' == 'true'">true</SuppressDependenciesWhenPacking>
</PropertyGroup>

<PropertyGroup>
<!--
Make sure any documentation comments which are included in code get checked for syntax during the build, but do
not report warnings for missing comments.
CS1573: Parameter 'parameter' has no matching param tag in the XML comment for 'parameter' (but other parameters do)
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
CS1712: Type parameter 'type_parameter' has no matching typeparam tag in the XML comment on 'type_or_member' (but other type parameters do)
-->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn Condition=" '$(IsShipping)' != 'true'">$(NoWarn);CS1573;CS1591;CS1712</NoWarn>
</PropertyGroup>

<PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.csproj' ">
<PackageId Condition=" '$(PackageId)' == '' ">$(AssemblyName)</PackageId>
<IsPackable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
<PropertyGroup>
<Description>CSharp Analyzers for ASP.NET Core.</Description>
<PackageTags>aspnetcore</PackageTags>

<!--
This package is for internal use only. It contains analyzers that are bundled in the .NET Core Web SDK.

We do need to pack it so it can be picked up by the Web SDK.
-->
<IsShippingPackage>false</IsShippingPackage>

<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<Nullable>Enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<NoPackageAnalysis>true</NoPackageAnalysis>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<Description>Roslyn analyzers for ASP.NET Core Components.</Description>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<Description>MSBuild task to generate a manifest that can be used by Microsoft.Extensions.FileProviders.Embedded to preserve
metadata of the files embedded in the assembly at compilation time.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<IsShippingAssembly>true</IsShippingAssembly>
<IsPackable>false</IsPackable>
<IsImplementationProject>false</IsImplementationProject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<PackageId>$(TargetingPackName).Internal</PackageId>
<VersionPrefix>$(TargetingPackVersionPrefix)</VersionPrefix>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<NoPackageAnalysis>true</NoPackageAnalysis>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<Description>Shared test suite for Asp.Net Identity Core store implementations.</Description>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PackageTags>aspnetcore;identity;membership</PackageTags>
<Nullable>disable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
<PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
<!-- This package is for internal use only. It contains analyzers that are bundled in the .NET Core WebSDK. -->
<IsShippingPackage>false</IsShippingPackage>

<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
<PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
<!-- This package is for internal use only. It contains analyzers that are bundled in the .NET Core WebSDK. -->
<IsShippingPackage>false</IsShippingPackage>

<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<PropertyGroup>
<Description>Build tasks for functional tests.</Description>
<TargetFramework>netstandard2.0</TargetFramework>

<GenerateDocumentationFile>false</GenerateDocumentationFile>
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
<IsPackable>false</IsPackable>
<IsShipping>false</IsShipping>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<RuntimeIdentifier>$(TargetRuntimeIdentifier)</RuntimeIdentifier>
<DebugType>none</DebugType>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
<TargetsForTfmSpecificBuildOutput>
$(TargetsForTfmSpecificBuildOutput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<title>ASP.NET Core Logging Integration</title>
<Description>This site extension enables logging integration for ASP.NET Core applications on Azure App Service.</Description>
<TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PackageTags>aspnet;logging;aspnetcore;AzureSiteExtension;keyvault;configuration;dataprotection</PackageTags>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PackageType>AzureSiteExtension</PackageType>
<NoPackageAnalysis>true</NoPackageAnalysis>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand Down
2 changes: 0 additions & 2 deletions src/SiteExtensions/LoggingBranch/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<!-- Manually control dependencies -->
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<!-- There is no documentation -->
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<!-- There is no documentation -->
<RunPackageAnalysis>false</RunPackageAnalysis>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/SiteExtensions/LoggingBranch/LB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<title>ASP.NET Core Extensions</title>
<Description>This extension enables additional functionality for ASP.NET Core on Azure WebSites, such as enabling Azure logging.</Description>
<TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PackageTags>aspnet;logging;aspnetcore;AzureSiteExtension;keyvault;configuration;dataprotection</PackageTags>
<ContentTargetFolders>content</ContentTargetFolders>
<PackageId>Microsoft.AspNetCore.AzureAppServices.SiteExtension.$(AspNetCoreMajorMinorVersion).$(TargetArchitecture)</PackageId>
Expand All @@ -16,7 +15,6 @@
<IncludeSymbols>false</IncludeSymbols>
<NoSemVer20>true</NoSemVer20>
<IsShippingPackage>false</IsShippingPackage>

<!-- No source files -->
<NoWarn>$(NoWarn);CS2008</NoWarn>
</PropertyGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/SiteExtensions/Runtime/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<!-- The only build output of a pkgproj is the project -->
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<!-- There is no documentation -->
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<!-- There is no documentation -->
<RunPackageAnalysis>false</RunPackageAnalysis>

</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<NoPackageAnalysis>true</NoPackageAnalysis>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<Description>Roslyn analyzers for ASP.NET Core Components.</Description>
<RootNamespace>Microsoft.AspNetCore.Components.Analyzers</RootNamespace>
<!-- This package is for internal use only. It contains a CLI which is bundled in the .NET Core SDK. -->
Expand Down
Loading