Skip to content

Commit 5611e53

Browse files
committed
ignore NU1902
1 parent 78e077c commit 5611e53

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/release_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# NuGetAudit is intentionally not disabled here like it is for other CI builds, because we need to address any
4444
# vulnerable packages before releasing a new version.
4545
run: |
46-
dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true /p:NoWarn=NU1902 -p:Version=${{ steps.get_version.outputs.VERSION }}
46+
dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true -p:Version=${{ steps.get_version.outputs.VERSION }}
4747
- name: Unit Tests
4848
run: |
4949
dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj

Directory.Build.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<Import Project="src\OrchardCore.Build\TargetFrameworks.props" />
4-
4+
55
<PropertyGroup>
66
<!-- https://aka.ms/vs-build-acceleration -->
77
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
@@ -11,6 +11,9 @@
1111

1212
<AnalysisLevel>latest-Recommended</AnalysisLevel>
1313

14+
<!-- Only treat analyzer warnings as errors -->
15+
<WarningsAsErrors>$(WarningsAsErrors);CS*;CA*</WarningsAsErrors>
16+
1417
<!-- The behavior could vary based on the current user's locale setting -->
1518
<NoWarn>$(NoWarn);CA1304;CA1305;CA1310</NoWarn>
1619

@@ -50,6 +53,8 @@
5053
<!-- CA1861: Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array -->
5154
<NoWarn>$(NoWarn);CA1861</NoWarn>
5255

56+
<NoWarn>$(NoWarn);NU1902</NoWarn>
57+
5358
</PropertyGroup>
5459

5560
</Project>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.101",
3+
"version": "8.0.100",
44
"rollForward": "latestMajor"
55
}
66
}

0 commit comments

Comments
 (0)