Skip to content

Commit

Permalink
Selectively opt-in some usage rules
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyaoyuan committed Nov 27, 2024
1 parent 3887b9b commit b723add
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ dotnet_diagnostic.CA2101.severity = none
# CA2201: Do not raise reserved exception types
dotnet_diagnostic.CA2201.severity = warning

#Disable operator overloads requiring alternate named methods
dotnet_diagnostic.CA2225.severity = none
# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = warning

# CA2242: Test for NaN correctly
dotnet_diagnostic.CA2242.severity = warning

# Banned APIs
dotnet_diagnostic.RS0030.severity = error
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<AnalysisModeNaming>Default</AnalysisModeNaming>
<AnalysisModePerformance>Minimum</AnalysisModePerformance>
<AnalysisModeReliability>Recommended</AnalysisModeReliability>
<AnalysisModeSecurity>Default</AnalysisModeSecurity>
<AnalysisModeUsage>Default</AnalysisModeUsage>
</PropertyGroup>
<PropertyGroup Label="NuGet">
<Authors>ppy Pty Ltd</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public DeferredVertexBatch(DeferredRenderer renderer, PrimitiveTopology topology
throw new NotImplementedException($"Topology '{topology}' is not yet implemented for this renderer.");

default:
throw new ArgumentOutOfRangeException();
throw new ArgumentOutOfRangeException(nameof(topology));
}
}
else
Expand Down

0 comments on commit b723add

Please sign in to comment.