Skip to content

Commit 15d6468

Browse files
committed
Fix NoWarn
1 parent 7cb48d8 commit 15d6468

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

CSharpMath.Rendering/CSharpMath.Rendering.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
55
<Description>Rendering interface for CSharpMath using the Typography library.</Description>
6-
<!-- Suppress nullable reference type warnings from Typography submodule -->
7-
<NoWarn>$(NoWarn);CS8618;CS8603;CS8625;CS8600;CS8601;CS8602;CS8604</NoWarn>
6+
<!-- Suppress compiler and analyzer warnings from Typography submodule since its code is not clean -->
7+
<!-- Applied globally to the project since item-level NoWarn doesn't reliably work for linked files -->
8+
<NoWarn>$(NoWarn);CS8618;CS8603;CS8625;CS8600;CS8601;CS8602;CS8604;CS0162;CS0168;CS0219;CS0649</NoWarn>
89
</PropertyGroup>
910
<ItemGroup>
1011
<EmbeddedResource Include="Reference Fonts\*.otf" />
@@ -13,9 +14,9 @@
1314
<PackageReference Include="System.Numerics.Vectors" Version="4.6.1" />
1415
</ItemGroup>
1516
<ItemGroup Label="Typography">
16-
<Compile Include="..\Typography\Typography.OpenFont\**\*.cs" Link="Typography\OpenFont\%(RecursiveDir)%(Filename)%(Extension)" />
17-
<Compile Include="..\Typography\Typography.GlyphLayout\**\*.cs" Exclude="..\Typography\Typography.GlyphLayout\**\\AssemblyInfo.cs" Link="Typography\GlyphLayout\%(RecursiveDir)%(Filename)%(Extension)" />
18-
<Compile Include="..\Typography\Typography.TextBreak\Typography.TextBreak\**\*.cs" Link="Typography\TextBreak\%(RecursiveDir)%(Filename)%(Extension)" />
17+
<Compile Include="..\Typography\Typography.OpenFont\**\*.cs" Exclude="..\Typography\Typography.OpenFont\**\AssemblyInfo.cs" Link="Typography\OpenFont\%(RecursiveDir)%(Filename)%(Extension)" />
18+
<Compile Include="..\Typography\Typography.GlyphLayout\**\*.cs" Exclude="..\Typography\Typography.GlyphLayout\**\AssemblyInfo.cs" Link="Typography\TextLayout\%(RecursiveDir)%(Filename)%(Extension)" />
19+
<Compile Include="..\Typography\Typography.TextBreak\Typography.TextBreak\**\*.cs" Exclude="..\Typography\Typography.TextBreak\Typography.TextBreak\**\AssemblyInfo.cs" Link="Typography\TextBreak\%(RecursiveDir)%(Filename)%(Extension)" />
1920
<Compile Include="..\Typography\PixelFarm.Typography\3_Typography_Contours\GlyphOutlineBuilderBase.cs" Link="Typography\%(RecursiveDir)%(Filename)%(Extension)" />
2021
</ItemGroup>
2122
<Target Name="CheckTypographySubmodule" BeforeTargets="BeforeBuild">

CSharpMath.Rendering/_IgnoreTypographyWarnings.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
[assembly:Suppress("", "IDE0063:'using' statement can be simplified", Target = _Typography, Justification = Justification, Scope = Scope)]
1616
[assembly:Suppress("", "IDE0066:Use 'switch' expression", Target = _Typography, Justification = Justification, Scope = Scope)]
1717
[assembly:Suppress("", "IDE1006:Naming rule violation: Prefix '_' is not expected", Target = _Typography, Justification = Justification, Scope = Scope)]
18-
[assembly:Suppress("", "CS0162:Unreachable code detected", Target = _Typography, Justification = Justification, Scope = Scope)]
19-
[assembly:Suppress("", "CS0168:Variable is declared but never used", Target = _Typography, Justification = Justification, Scope = Scope)]
20-
[assembly:Suppress("", "CS0219:Variable is assigned but never used", Target = _Typography, Justification = Justification, Scope = Scope)]
21-
[assembly:Suppress("", "CS0649:Field is never assigned to and will always have its default value", Target = _Typography, Justification = Justification, Scope = Scope)]
2218

2319
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
2420
static class IgnoreTypographyWarnings {

0 commit comments

Comments
 (0)