Skip to content

Enable warnings-as-errors via Directory.Build.props (closes #310)#315

Open
wrigjl wants to merge 1 commit into
ReduxISU:CSharpAPIfrom
wrigjl:feature/warnings-as-errors-310
Open

Enable warnings-as-errors via Directory.Build.props (closes #310)#315
wrigjl wants to merge 1 commit into
ReduxISU:CSharpAPIfrom
wrigjl:feature/warnings-as-errors-310

Conversation

@wrigjl

@wrigjl wrigjl commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Closes #310.

What

  • Add a repo-root Directory.Build.props with TreatWarningsAsErrors=true. MSBuild auto-imports it into every project (API.csproj and redux-tests), so any compiler warning is now a hard build failure — the gcc -Werror equivalent.
  • Remove the now-redundant warning-gate job from .github/workflows/main.yml. With warnings as errors, the regular build job fails on any warning, so the warning-count ratchet is obsolete.

CS1591 policy

Kept strict. API.csproj already sets GenerateDocumentationFile=true and currently emits zero CS1591 warnings, so -Werror is safe today; future undocumented public members will now fail the build (as recommended in the issue).

Precondition

The four warning-fix PRs (#306#309) have all landed, so the CSharpAPI base builds clean.

Verification (local, Release, --no-incremental)

  • dotnet build Redux.slnx (props enforcing): 0 Warning(s), 0 Error(s)
  • dotnet test Redux.slnx: 555 passed, 0 failed

🤖 Generated with Claude Code

)

Add a repo-root Directory.Build.props setting TreatWarningsAsErrors=true.
MSBuild auto-imports it into every project (API.csproj and redux-tests),
so any compiler warning is now a hard build failure -- the equivalent of
gcc -Werror. The CSharpAPI base builds clean (0 warnings, 555 tests pass)
now that ReduxISU#306-ReduxISU#309 have landed, so this cannot regress above zero.

CS1591 (missing XML doc comments) is kept strict: API.csproj already sets
GenerateDocumentationFile=true and emits zero such warnings, so future
undocumented public members will now fail the build.

Remove the now-redundant warning-gate job from main.yml: the regular build
job fails on any warning, so the warning-count ratchet is obsolete.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

Enable warnings-as-errors via Directory.Build.props

1 participant