Skip to content

Modify TargetFramework and NoWarn settings - #19

Open
XieonCrypto wants to merge 2 commits into
hexbyt3:mainfrom
XieonCrypto:PR-for-upstream
Open

XieonCrypto wants to merge 2 commits into
hexbyt3:mainfrom
XieonCrypto:PR-for-upstream

Conversation

@XieonCrypto

@XieonCrypto XieonCrypto commented Sep 25, 2026 •

Copy link
Copy Markdown

Fixed your build props, added pragma warnings
$(NoWarn);CS0108;CS0169;CS0219;CS0414;CS0649;CS8602;CS8603;CS8604;CS8618;CS8622;CS8629

  • These will not trigger a warnng message in VSCode or on Github depending on which actions/workflows you use and how;

Added:


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.

Summary by CodeRabbit

  • Build
    • Projects without a specified target framework now default to .NET 7.
    • Selected compiler warnings are suppressed for projects using the shared build configuration; other build failures and warnings remain visible.
  • Documentation
    • Added guidance on the suppressed warnings, their scope, and how the list is maintained.

Updated TargetFramework condition and added NoWarn properties.
Document repository-wide warning suppression configuration and rationale for suppressed warning IDs.
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3df0188b-c5bd-45f8-b2eb-7105e651c5fa

📥 Commits

Reviewing files that changed from the base of the PR and between 2b8f26d and 1240271.

📒 Files selected for processing (2)
  • Directory.Build.props
  • pragma_warning_suppression.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The shared build properties now set net7.0 only when both framework properties are empty and add warning IDs to NoWarn. A new document lists the suppressed warnings, their stated rationales, scope, maintenance guidance, and the build used to derive the list.

Changes

Shared build configuration

Layer / File(s) Summary
Framework default and warning suppression
Directory.Build.props, pragma_warning_suppression.md
The framework default now applies only when both framework properties are empty. NoWarn includes the listed warning IDs. The document describes the warnings, stated rationales, scope, and maintenance guidance.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 12402

No actionable issue remains in the shared build configuration or its documentation. The change is mergeable after normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 12402

The change affects 2 systems.

Changed systems: Directory.Build.props, pragma_warning_suppression.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — Directory.Build.props (service) was modified; 1 changed file maps to changed impact.
  • observed — pragma_warning_suppression.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in Directory.Build.props: The TargetFramework default now applies only when both framework properties are empty; NoWarn adds the listed warning codes to the suppression list. The runtime identifier, language version, and nullable setting remain unchanged.
  • observed — Modified behavior in Directory.Build.props: The closing Project element is unchanged.
  • observed — Modified behavior in pragma_warning_suppression.md: Added documentation describing the shared NoWarn configuration, the 12 suppressed warning IDs and their stated rationales, maintenance guidance, and the build used to derive the list.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes to the TargetFramework condition and NoWarn settings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant