Skip to content

Commit

Permalink
Disable analyzers for trimming test
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Jan 30, 2025
1 parent 6459141 commit 9ed3478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
name: Install Current .NET SDK
# Building the analyzers (the code fix projects in particular) for the linux runtime
# results in some super-old System.* packages with vulnerabilities being pulled in.
# Our analyzers don't do anything wrt. trimming and AOT so it's safe to disable them.
- name: Run trimming test
run: dotnet publish -c Release Funcky.TrimmingTest -r linux-x64 --self-contained /p:TreatWarningsAsErrors=true
run: dotnet publish -c Release Funcky.TrimmingTest -r linux-x64 --self-contained /p:TreatWarningsAsErrors=true /p:FunckyDisableAnalyzers=true
- name: Run AOT test
run: dotnet publish -c Release Funcky.TrimmingTest -r linux-x64 --self-contained /p:TreatWarningsAsErrors=true /p:FunckyTestAot=true
run: dotnet publish -c Release Funcky.TrimmingTest -r linux-x64 --self-contained /p:TreatWarningsAsErrors=true /p:FunckyDisableAnalyzers=true /p:FunckyTestAot=true

nupkg:
name: Generate NuGet Packages
Expand Down
2 changes: 1 addition & 1 deletion Analyzers.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup Label="Funcky Analyzers">
<ItemGroup Label="Funcky Analyzers" Condition="'$(FunckyDisableAnalyzers)' != 'true'">
<ProjectReference Include="..\Funcky.Analyzers\Funcky.Analyzers\Funcky.Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" />
<ProjectReference Include="..\Funcky.Analyzers\Funcky.Analyzers.CodeFixes\Funcky.Analyzers.CodeFixes.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" />
<ProjectReference Include="..\Funcky.Analyzers\Funcky.BuiltinAnalyzers\Funcky.BuiltinAnalyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" />
Expand Down

0 comments on commit 9ed3478

Please sign in to comment.