Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">net7.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<LangVersion>11</LangVersion>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);CS0108;CS0169;CS0219;CS0414;CS0649;CS8602;CS8603;CS8604;CS8618;CS8622;CS8629</NoWarn>
<NeutralLanguage>en</NeutralLanguage>
<SelfContained>false</SelfContained>
<PackageAsSingleFile>true</PackageAsSingleFile>
Expand All @@ -19,4 +20,4 @@
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugType>portable</DebugType>
</PropertyGroup>
</Project>
</Project>
25 changes: 25 additions & 0 deletions pragma_warning_suppression.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Warning Suppression

The repository-wide warning suppression is configured in `Directory.Build.props` through the `NoWarn` property. This is the MSBuild/project-wide equivalent of applying `#pragma warning disable`; it applies to every project importing the shared file, including the local `TradebotCore` projects.

## Suppressed IDs

| Warning | Meaning | Why suppressed |
| --- | --- | --- |
| CS0108 | Member hides an inherited member | Existing intentional or legacy member hiding. |
| CS0169 | Private field is never used | Existing unused state retained for compatibility. |
| CS0219 | Local variable is assigned but never used | Existing compatibility code and command handlers. |
| CS0414 | Field is assigned but never used | Existing optional configuration/runtime state. |
| CS0649 | Field is never assigned | Fields populated by serializers or external/runtime code. |
| CS8602 | Possible null dereference | Existing code relies on initialized runtime services/configuration. |
| CS8603 | Possible null reference return | Existing APIs preserve nullable-compatible legacy behavior. |
| CS8604 | Possible null argument | Existing runtime validation/configuration guarantees are outside static analysis. |
| CS8618 | Non-nullable member is not initialized | Members initialized by deserialization or startup wiring. |
| CS8622 | Nullability mismatch in delegate parameter | Existing event-handler signatures required by third-party APIs. |
| CS8629 | Nullable value type may be null | Existing code relies on validated runtime values. |

## Scope and maintenance

These suppressions are intentionally broad so the current solution builds consistently across all projects. New code should still avoid introducing nullable or unused-member warnings. When a warning can be fixed safely at its source, prefer the source fix and remove that ID from `NoWarn` only after all affected projects are clean.

The suppression list was derived from the warning IDs emitted by a full `dotnet build` on 2026-09-25. It suppresses compiler warnings only; build failures and analyzer warnings with other IDs remain visible.