Skip to content

Commit

Permalink
Unbreak build pipeline after most recent drop of Analyzers (#813)
Browse files Browse the repository at this point in the history
* Suppress issues from latest analyzer version

* Revert NU1701 warning suppression

* Skip broken test, tracked at #815
  • Loading branch information
DaveTryon authored Nov 27, 2024
1 parent d6465dd commit af3c747
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);CA1014;CS8002;CA1416</NoWarn>
<NoWarn>$(NoWarn);CA1014;CS8002;CA1416;CA1515;CA1872;CA2263</NoWarn>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>

Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.Sbom.Api/Microsoft.Sbom.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<ItemGroup>
<!-- Pinned assemblies for transitive dependencies -->
<PackageReference Include="Microsoft.Extensions.Caching.Memory" /> <!-- Used by ComponentDetection -->
<PackageReference Include="System.Net.Http" /> <!-- Used by ComponentDetection -->
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions test/Microsoft.Sbom.Targets.E2E.Tests/GenerateSbomE2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ public void SbomGenerationSkipsForUnsetGenerateSBOMFlag()
[TestMethod]
public void SbomGenerationSucceedsForMultiTargetedProject()
{
if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.Ordinal))
{
Assert.Inconclusive("This test needs to be updated to work with Visual Studio 17.12 and .NET 8. This is tracked at https://github.com/microsoft/sbom-tool/issues/815.");
return;
}

if (!IsWindows)
{
Assert.Inconclusive("This test is not (yet) supported on non-Windows platforms.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<SbomCLIToolTargetFramework>net8.0</SbomCLIToolTargetFramework>
<SBOMCLIToolProjectDir>$(MSBuildThisFileDirectory)..\..\src\Microsoft.Sbom.Tool\</SBOMCLIToolProjectDir>
<SBOMGenerationTargetsPath>$(MSBuildThisFileDirectory)..\..\src\Microsoft.Sbom.Targets\Microsoft.Sbom.Targets.targets</SBOMGenerationTargetsPath>
<NoWarn>CA1515;NU1903</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
<NoWarn>CA1515</NoWarn>
</PropertyGroup>

<!--Ignore errors related to selecting a nuget.config and dependency resolution-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<RootNamespace>Microsoft.Sbom.Targets.Tests</RootNamespace>
<SbomCLIToolTargetFramework>net8.0</SbomCLIToolTargetFramework>
<SBOMCLIToolProjectDir>$(MSBuildThisFileDirectory)..\..\src\Microsoft.Sbom.Tool\</SBOMCLIToolProjectDir>
<NoWarn>CA1515;CA1872;NU1903</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down

0 comments on commit af3c747

Please sign in to comment.