Skip to content

Commit

Permalink
Enable code coverage (#17067)
Browse files Browse the repository at this point in the history
* Use VSTest integration for Coverlet

Fixes #15231. Relates to #14427.

* Do not ignore CompilerGeneratedAttribute

See coverlet-coverage/coverlet#794 (comment)

* Enable code coverage for PRs

* Publish code coverage even for failed tests

* Enable code coverage reports

Resolves #14427 by limiting reports to a single service directory (CIs) or per test project (dev environments). For CIs, full coverage reports of everything build will be uploaded. For dev environments, a summary HTML file will be output to test projects' TestResults directories.

* Fix filefilters path for CI

* Use absolute path for filefilters

Same as dev support; reportgenerator documentation is not clear on when absolute or relative paths are required.

* Use absolute path for reports

* Update report directory to limit globbing

* Disable code coverage of track 2 mgmt

Opened #17090 to track re-enabling once improved.

* Generate report before uploading test results

The exact same commands are working locally using the same versions of ReportGenerator, sans running the test publishing executable. There's also extra coverage files showing up that I'm wondering if it's responsible.

* Temporarily upload all code coverage artifacts

* Split between props and targets again

At one point, this mostly worked. Going back to how I was split between props and targets before to see if that makes a difference.

* Collect more information

* Always define CoverletGetPathMap

@clairernovotny recommended important some changes. These are working locally when simulating a CI, so 🤞.

* Resolve PR feedback

Fix extra (temporary) logging as well.

* Use different variable to detect CI

ContinuousIntegrationBuild wasn't defined for test projects.

* Replace curly braces with Of in file names

Fixes #17164

* Removing extra logging

* Renames files with curly braces

Fixes #17164

* Resolve PR feedback

* Do not reformat HTML coverage report
  • Loading branch information
heaths authored Nov 25, 2020
1 parent 288ff39 commit fcf2d56
Show file tree
Hide file tree
Showing 53 changed files with 191 additions and 59 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "4.8.0",
"commands": [
"reportgenerator"
]
}
}
}
23 changes: 21 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ Nuget package will be created in root directory under \artifacts\packages\Debug
### Using the command line:

Run e.g. `msbuild eng\mgmt.proj /t:"Runtests" /p:Scope=Compute`
In the above example _RunTests_ will build and run tests for Compute only or you can use command line CLI
`dotnet test Compute\Microsoft.Azure.Management.Compute\tests\Microsoft.Azure.Management.Tests.csproj`
In the above example _RunTests_ will build and run tests for Compute only or you can use command line CLI:

```bash
dotnet test Compute\Microsoft.Azure.Management.Compute\tests\Microsoft.Azure.Management.Tests.csproj

This comment has been minimized.

Copy link
@Sarathkumardunga

Sarathkumardunga Aug 5, 2021

update with error fixed

```

### Non-Windows command line build

Expand All @@ -67,6 +70,22 @@ Now you can use the same command on non-windows as above for e.g. on Ubuntu you
- `dotnet msbuild eng\mgmt.proj /t:CreateNugetPackage /p:scope=Compute`
- `dotnet msbuild build.proj /t:Util /p:UtilityName=InstallPsModules`

### Code Coverage

If you want to enable code coverage reporting, on the command line pass `/p:CollectCoverage=true` like so:

```bash
dotnet tool restore
dotnet test /p:CollectCoverage=true
```

On developers' machines, you can open `index.html` from within the `TestResults` directory in each of your test projects.
Coverage reports can also be found in Azure Pipelines on the "Code Coverage" tab after a pull request validation build completes.
All covered projects should have 70% or better test coverage.

By default, all _Azure.*_ libraries are covered, and any project that sets the `IsClientLibrary=true` MSBuild property.
To exclude a project, set `ExcludeFromCodeCoverage=true` in the project's MSBuild properties before other targets are imported.

### Update build tools

Build tools are now downloaded as part of a nuget package under `root\restoredPackages\microsoft.internal.netsdkbuild.mgmt.tools`
Expand Down
18 changes: 18 additions & 0 deletions eng/CodeCoverage.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat Code Coverage" enabled="true">
<Configuration>
<Format>cobertura</Format>
<ExcludeByAttribute>ExcludeFromCodeCoverageAttribute,GeneratedCodeAttribute,Obsolete</ExcludeByAttribute>
<IncludeTestAssembly>false</IncludeTestAssembly>
<SingleHit>false</SingleHit>
<SkipAutoProps>true</SkipAutoProps>
</Configuration>
</DataCollector>
<!-- Enable logging to diagnose test host failures -->
<DataCollector friendlyName="blame" enabled="true" />
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
70 changes: 64 additions & 6 deletions eng/CodeCoverage.targets
Original file line number Diff line number Diff line change
@@ -1,13 +1,70 @@
<Project>
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="coverlet.msbuild">
<PropertyGroup>
<_IsCodeCoverable Condition="'$(IsClientLibrary)' == 'true' and '$(IsMgmtClientLibrary)' != 'true'">true</_IsCodeCoverable>
</PropertyGroup>

<PropertyGroup Condition="'$(CollectCoverage)' == 'true' and '$(_IsCodeCoverable)' == 'true' and '$(IsTestProject)' == 'true' and '$(ExcludeFromCodeCoverage)' != 'true'">
<CodeCoverageDirectory Condition="'$(CodeCoverageDirectory)' == ''">$([System.IO.Path]::GetFullPath("$(MSBuildProjectDirectory)\.."))</CodeCoverageDirectory>
<SkipCoverageReport Condition="'$(SkipCoverageReport)' == '' and ('$(ContinuousIntegrationBuild)' == 'true' or '$(TF_BUILD)' == 'true')">true</SkipCoverageReport>
<VSTestCollect Condition="'$(VSTestCollect)' == ''">XPlat Code Coverage</VSTestCollect>
<VSTestSetting Condition="'$(VSTestSetting)' == ''">$(MSBuildThisFileDirectory)CodeCoverage.runsettings</VSTestSetting>
<_CollectCoverage>true</_CollectCoverage>
<_TestResultsDirectory>$(MSBuildProjectDirectory)\TestResults</_TestResultsDirectory>
</PropertyGroup>

<ItemGroup Condition="'$(_CollectCoverage)' == 'true'">
<!--
Use VSTest integration to work around test host crashes on larger collections:
https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md
-->
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- Allows Collection of Code Coverage for Deterministic Builds
https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md -->
<!-- Clean up previous TestResults so reports are recent. -->
<Target Name="CleanPreviousCodeCoverage"
BeforeTargets="VSTest"
Condition="'$(_CollectCoverage)' == 'true'">
<RemoveDir Directories="$(_TestResultsDirectory)" />
</Target>

<!-- Should be similar to what's in the pipelines, though generate a full HTML report. -->
<Target Name="GenerateCodeCoverageReport"
AfterTargets="VSTest"
Condition="'$(_CollectCoverage)' == 'true' and '$(SkipCoverageReport)' != 'true'">
<PropertyGroup>
<CoverageReportCommandLine>dotnet tool run reportgenerator --</CoverageReportCommandLine>
<CoverageReportCommandLine>$(CoverageReportCommandLine) "-reports:$(_TestResultsDirectory)\**\coverage.cobertura.xml"</CoverageReportCommandLine>
<CoverageReportCommandLine>$(CoverageReportCommandLine) -reporttypes:Html</CoverageReportCommandLine>
<CoverageReportCommandLine>$(CoverageReportCommandLine) "-targetdir:$(_TestResultsDirectory)"</CoverageReportCommandLine>
<CoverageReportCommandLine>$(CoverageReportCommandLine) "-filefilters:+$(CodeCoverageDirectory)\**"</CoverageReportCommandLine>
</PropertyGroup>
<Exec Command="$(CoverageReportCommandLine)"
IgnoreExitCode="true"
StandardErrorImportance="high"
StandardOutputImportance="low" />
</Target>

<Target Name="_ValidateSourceFileNames"
BeforeTargets="CoreBuild"
Condition="'$(_IsCodeCoverable)' == 'true'">
<ItemGroup>
<!-- Prevent https://github.com/Azure/azure-sdk-for-net/issues/17164 from becoming an issue further in the build process -->
<_ContainsCurlyBraces Include="@(Compile)" Condition="$([MSBuild]::ValueOrDefault('%(Directory)%(Filename)', '').Contains('{')) or $([MSBuild]::ValueOrDefault('%(Directory)%(Filename)', '').Contains('}'))" />
</ItemGroup>
<Error
Text="File name '%(_ContainsCurlyBraces.FullPath)' cannot contain { or }; remove type parameters from the file name, or change {T} to OfT and disable SA1649 if the class has a non-generic counterpart (https://github.com/Azure/azure-sdk-for-net/issues/17164)."
Condition="'@(_ContainsCurlyBraces)' != ''" />
</Target>

<!--
Allows Collection of Code Coverage for Deterministic Builds:
https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md
This needs to be available in all projects.
-->
<ItemGroup>
<SourceRoot Include="$(NuGetPackageRoot)" />
</ItemGroup>
Expand All @@ -17,7 +74,8 @@
Returns="@(_LocalTopLevelSourceRoot)"
Condition="'$(DeterministicSourcePaths)' == 'true'">
<ItemGroup>
<_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
<_LocalTopLevelSourceRoot Include="@(SourceRoot)"
Condition="'%(SourceRoot.NestedRoot)' == ''"/>
</ItemGroup>
</Target>
</Project>
</Project>
4 changes: 2 additions & 2 deletions eng/Directory.Build.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
<GenerateAPIListing Condition="'$(IsShippingClientLibrary)' == 'true'">true</GenerateAPIListing>
<UpdateSourceOnBuild Condition="'$(UpdateSourceOnBuild)' == ''">$(AZURE_DEV_UPDATESOURCESONBUILD)</UpdateSourceOnBuild>
<PowerShellExe Condition="'$(PowerShellExe)' == ''">pwsh</PowerShellExe>
<CoverletOutputFormat Condition="'$(CoverletOutputFormat)' == '' and '$(CollectCoverage)' == 'true'">cobertura</CoverletOutputFormat>
<InheritDocEnabled>false</InheritDocEnabled>
</PropertyGroup>

Expand Down Expand Up @@ -97,7 +96,8 @@
<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsSamplesProject)' == 'true' or '$(IsPerfProject)' == 'true' or '$(IsStressProject)' == 'true'">
<IsPackable>false</IsPackable>
<RequiredTargetFrameworks>netcoreapp2.1;net5.0</RequiredTargetFrameworks>
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">netcoreapp2.1;net5.0;net461</RequiredTargetFrameworks>
<!-- Also test net461 on Windows; it's listed first so that coverage reports are for netcoreapp2.1 (the "primary"). -->
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net461;netcoreapp2.1;net5.0</RequiredTargetFrameworks>
</PropertyGroup>

<Import Project="$(RepoRoot)/sdk/core/Azure.Core/src/Azure.Core.props" Condition="'$(IsMgmtClientLibrary)' == 'true'"/>
Expand Down
7 changes: 3 additions & 4 deletions eng/Directory.Build.Data.targets
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@
<None Condition="Exists('$(MSBuildProjectDirectory)/../README.md')" Include="$(MSBuildProjectDirectory)/../README.md" Pack="true" PackagePath=""/>
</ItemGroup>

<!-- Collect Code Coverage -->
<Import Condition="'$(CollectCoverage)' == 'true'" Project="$(MSBuildThisFileDirectory)\CodeCoverage.targets" />

<!-- Add StyleCop Analyzers -->
<ItemGroup Condition="'$(EnableStyleCopAnalyzers)' == 'true'" >
<PackageReference Include="StyleCop.Analyzers">
Expand All @@ -85,7 +82,7 @@
</AdditionalFiles>
</ItemGroup>

<!-- Enable SourceLink -->
<!-- Enable SourceLink -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
Expand All @@ -105,6 +102,8 @@

<Import Project="ApiListing.targets" />

<Import Project="CodeCoverage.targets" />

<Import Project="CodeGeneration.targets" Condition="'$(TemporaryUsePreviousGeneratorVersion)' == 'true'" />

<Import Project="TestFramework.targets" Condition="'$(IsTestProject)' == 'true'"/>
Expand Down
12 changes: 6 additions & 6 deletions eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<ItemGroup>
<PackageReference Update="ApprovalTests" Version="3.0.22" />
<PackageReference Update="ApprovalUtilities" Version="3.0.22" />
<PackageReference Update="AutoRest.CSharp.V3" Version="1.0.0-alpha.20201123.1" />
<PackageReference Update="AutoRest.CSharp.V3" Version="1.0.0-alpha.20201123.2" />
<PackageReference Update="Azure.AI.FormRecognizer" Version="3.0.0" />
<PackageReference Update="Azure.AI.TextAnalytics" Version="5.0.0" />
<PackageReference Update="Azure.AI.TextAnalytics" Version="5.0.0" />
<PackageReference Update="Azure.Data.AppConfiguration" Version="1.0.0" />
<PackageReference Update="Azure.Core" Version="1.6.0" />
<PackageReference Update="Azure.Core.Amqp" Version="1.0.0" />
Expand All @@ -32,7 +32,7 @@
<PackageReference Update="Azure.Storage.Blobs.ChangeFeed" Version="12.0.0-preview.1" />
<PackageReference Update="BenchmarkDotNet" Version="0.11.5" />
<PackageReference Update="Castle.Core" Version="4.4.0" />
<PackageReference Update="coverlet.msbuild" Version="2.9.0" />
<PackageReference Update="coverlet.collector" Version="1.3.0" />
<PackageReference Update="FluentAssertions" Version="5.10.3" />
<PackageReference Update="FsCheck.Xunit" Version="2.14.0" />
<PackageReference Update="Microsoft.Azure.Amqp" Version="2.4.8" />
Expand Down Expand Up @@ -69,7 +69,7 @@
<PackageReference Update="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="4.5.1" />
<PackageReference Update="Microsoft.Identity.Client" Version="4.22.0" />
<PackageReference Update="Microsoft.Identity.Client.Extensions.Msal" Version="2.16.5" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.1.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Update="Microsoft.NETCore.Platforms" Version="2.2.1" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Update="Microsoft.Rest.ClientRuntime.Azure.Authentication" Version="[2.4.0]" />
Expand Down Expand Up @@ -180,9 +180,9 @@
<PackageReference Update="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />

<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />

<PackageReference Update="Microsoft.Azure.Devices.Client" Version="1.27.0" />

<!-- Mgmt sdk packages-->
<PackageReference Update="Azure.ResourceManager.Resources" Version="1.0.0-preview.2" />
<PackageReference Update="Azure.ResourceManager.Compute" Version="1.0.0-preview.2" />
Expand Down
27 changes: 17 additions & 10 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ jobs:
condition: and(succeededOrFailed(), ne(variables['Skip.Test'], true))
variables:
- template: ../variables/globals.yml
- name: disable.coverage.autogenerate
value: true
strategy:
maxParallel: $[ variables['MaxParallelTestJobs'] ]
matrix:
Expand All @@ -119,6 +121,7 @@ jobs:
Windows_NetCoreApp:
OSVmImage: "windows-2019"
TestTargetFramework: netcoreapp2.1
CollectCoverage: true
Windows_NetCoreApp_ProjectReferences:
OSVmImage: "windows-2019"
TestTargetFramework: netcoreapp2.1
Expand Down Expand Up @@ -149,7 +152,8 @@ jobs:
--logger "trx;LogFileName=$(TestTargetFramework).trx" --logger:"console;verbosity=normal"
/p:ServiceDirectory=${{parameters.ServiceToTest}}
/p:IncludeSrc=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false
/p:Configuration=$(BuildConfiguration) $(ConvertToProjectReferenceOption) /p:CollectCoverage=$(CollectCoverage)
/p:Configuration=$(BuildConfiguration) $(ConvertToProjectReferenceOption)
/p:CollectCoverage=$(CollectCoverage) /p:CodeCoverageDirectory=${{parameters.ServiceDirectory}}
displayName: "Build & Test ($(TestTargetFramework))"
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
Expand All @@ -163,15 +167,18 @@ jobs:
testResultsFormat: "VSTest"
mergeTestResults: true
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
condition: and(succeeded(), eq(variables['CollectCoverage'], 'true'))
displayName: ReportGenerator
condition: and(succeededOrFailed(), eq(variables['CollectCoverage'], 'true'))
displayName: Generate Code Coverage Reports
inputs:
reports: '**/*coverage.netcoreapp2.1.cobertura.xml'
targetdir: '$(Build.SourcesDirectory)'
reporttypes: Cobertura
reports: $(Build.SourcesDirectory)\sdk\${{parameters.ServiceDirectory}}\**\coverage.cobertura.xml
targetdir: $(Build.ArtifactStagingDirectory)\coverage
reporttypes: Cobertura;HtmlInline_AzurePipelines
filefilters: +$(Build.SourcesDirectory)\sdk\${{parameters.ServiceDirectory}}\**
verbosity: Verbose
- task: PublishCodeCoverageResults@1
condition: and(succeeded(), eq(variables['CollectCoverage'], 'true'))
displayName: 'Publish code coverage report'
condition: and(succeededOrFailed(), eq(variables['CollectCoverage'], 'true'))
displayName: Publish Code Coverage Reports
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: 'Cobertura.xml'
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.ArtifactStagingDirectory)\coverage\Cobertura.xml
reportDirectory: $(Build.ArtifactStagingDirectory)\coverage
3 changes: 3 additions & 0 deletions eng/service.proj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<IncludeStress Condition="'$(IncludeStress)' == ''">true</IncludeStress>
<IncludeSamplesApplications Condition="'$(IncludeSamplesApplications)' == ''">true</IncludeSamplesApplications>
<IncludeSamplesApplications Condition="'$(ServiceDirectory)' != '*' or '$(IncludeSamples)' == 'false'">false</IncludeSamplesApplications>
<TraversalGlobalProperties>
CodeCoverageDirectory=$([System.IO.Path]::GetFullPath("$(CodeCoverageDirectory)", "$(MSBuildThisFileDirectory)..\sdk"));
</TraversalGlobalProperties>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<Compile Include="$(AzureCoreSharedSources)ConditionalRequestOptionsExtensions.cs" />
<Compile Include="$(AzureCoreSharedSources)DiagnosticScope.cs" />
<Compile Include="$(AzureCoreSharedSources)HashCodeBuilder.cs" />
<Compile Include="$(AzureCoreSharedSources)NoBodyResponse{T}.cs" />
<Compile Include="$(AzureCoreSharedSources)NoBodyResponseOfT.cs" />
<Compile Include="$(AzureCoreSharedSources)PageResponseEnumerator.cs" />
<Compile Include="$(AzureCoreSharedSources)DiagnosticScopeFactory.cs" />
<Compile Include="$(AzureCoreSharedSources)TaskExtensions.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

namespace Azure.Core.TestFramework
{
#pragma warning disable SA1649 // File name should match first type name
public abstract class RecordedTestBase<TEnvironment> : RecordedTestBase where TEnvironment : TestEnvironment, new()
#pragma warning restore SA1649 // File name should match first type name
{
protected RecordedTestBase(bool isAsync) : base(isAsync)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ namespace Azure
/// Represents a long-running operation.
/// </summary>
/// <typeparam name="T">The final result of the long-running operation.</typeparam>
#pragma warning disable SA1649 // File name should match first type name
public abstract class Operation<T> where T : notnull
#pragma warning restore SA1649 // File name should match first type name
{
/// <summary>
/// Gets an ID representing the operation that can be used to poll for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ namespace Azure
/// </summary>
/// <typeparam name="T">The type of returned value.</typeparam>
[DebuggerTypeProxy(typeof(ResponseDebugView<>))]
#pragma warning disable SA1649 // File name should match first type name
public abstract class Response<T>
#pragma warning restore SA1649 // File name should match first type name
{
/// <summary>
/// Returns the HTTP response returned by the service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

namespace Azure
{
#pragma warning disable SA1649 // File name should match first type name
internal class NoBodyResponse<T> : Response<T>
#pragma warning restore SA1649 // File name should match first type name
{
private readonly Response _response;

Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<Compile Include="..\src\Shared\AzureResourceProviderNamespaceAttribute.cs" />
<Compile Include="..\src\Shared\ConnectionString.cs" />
<Compile Include="..\src\Shared\ForwardsClientCallsAttribute.cs" />
<Compile Include="..\src\Shared\NoBodyResponse{T}.cs" />
<Compile Include="..\src\Shared\NoBodyResponseOfT.cs" />
<Compile Include="..\src\Shared\OperationHelpers.cs" />
<Compile Include="..\src\Shared\PageResponseEnumerator.cs" />
<Compile Include="..\src\Shared\RetriableStream.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ExcludeFromCodeCoverage>true</ExcludeFromCodeCoverage>
<SupportsNetStandard20>true</SupportsNetStandard20>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

namespace Microsoft.Azure.WebJobs.Host.TestCommon
{
#pragma warning disable SA1649 // File name should match first type name
public class FakeTypeLocator<T> : ITypeLocator
#pragma warning restore SA1649 // File name should match first type name
{
public IReadOnlyList<Type> GetTypes()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ namespace Azure.AI.FormRecognizer.Models
/// Represents a field recognized in the input form, where the field's value is of a known type.
/// </summary>
/// <typeparam name="T">The type of the value in the field this instance represents.</typeparam>
#pragma warning disable SA1649 // File name should match first type name
public class FormField<T>
#pragma warning restore SA1649 // File name should match first type name
{
/// <summary>
/// Initializes a new instance of the <see cref="FormField{T}"/> class.
Expand Down
Loading

0 comments on commit fcf2d56

Please sign in to comment.