Skip to content

build: pin AnalysisLevel to avoid analyzer drift on SDK bumps - #322

Merged
DeepDiver1975 merged 1 commit into
mainfrom
build/pin-analysis-level-301
Sep 15, 2026
Merged

DeepDiver1975 merged 1 commit into
mainfrom
build/pin-analysis-level-301

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Summary

  • global.json uses rollForward: latestFeature, so a routine SDK bump could silently pull in a newer default analyzer rule set. Combined with TreatWarningsAsErrors + AnalysisMode=All, that turns an SDK bump into an unrelated build break.
  • Pinned <AnalysisLevel>10.0</AnalysisLevel> in Directory.Build.props, matching the level implied by the SDK pinned in global.json today — preserves current behavior exactly, but future rule-set adoption now requires a deliberate, reviewable bump of this value.
  • Part of build/ci: coverage, deterministic builds, AnalysisLevel pin, changelog enforcement #301.

Note: this touches the same file as #321 (deterministic builds) — whichever merges first, the other should rebase before merging to avoid a conflict on adjacent lines in Directory.Build.props.

Test plan

  • dotnet build LageBuch.Desktop.slnf --configuration Release --no-incremental — succeeds, 0 warnings/0 errors, identical to pre-change output (confirms this pins current behavior without changing it)
  • dotnet test LageBuch.Desktop.slnf --configuration Release --no-build — 167 passed, 1 skipped, 0 failed

🤖 Generated with Claude Code

https://claude.ai/code/session_01R9oidCyJ6YmhtCxu9WxGKo

global.json uses rollForward: latestFeature, so an SDK bump could silently
pull in a newer default analyzer rule set; combined with
TreatWarningsAsErrors, that turns a routine SDK bump into a build break.
Pin <AnalysisLevel> explicitly to the level matching today's SDK (10.0), so
adopting new rules becomes a deliberate, reviewable diff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R9oidCyJ6YmhtCxu9WxGKo
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 force-pushed the build/pin-analysis-level-301 branch from 2f66749 to d7df4c0 Compare September 15, 2026 08:45
@DeepDiver1975
DeepDiver1975 merged commit 7150a32 into main Sep 15, 2026
3 checks passed
@DeepDiver1975
DeepDiver1975 deleted the build/pin-analysis-level-301 branch September 15, 2026 08:49
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.

build/ci: coverage, deterministic builds, AnalysisLevel pin, changelog enforcement

1 participant