Skip to content

Promote typed parameter diagnostics to warnings - #14706

Merged
OvesN merged 1 commit into
dotnet:mainfrom
OvesN:dev/veronikao/typed-parameter-analyzer-warnings
Aug 17, 2026
Merged

OvesN merged 1 commit into
dotnet:mainfrom
OvesN:dev/veronikao/typed-parameter-analyzer-warnings

Conversation

@OvesN

@OvesN OvesN commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Promotes MSBuildTask0006-MSBuildTask0008 from Info to Warning so they appear in CLI builds and Visual Studio without extra configuration.

Copilot AI lite review requested due to automatic review settings August 14, 2026 15:31
@OvesN
OvesN temporarily deployed to copilot-pat-pool August 14, 2026 15:31 — with GitHub Actions Inactive
@OvesN
OvesN temporarily deployed to copilot-pat-pool August 14, 2026 15:31 — with GitHub Actions Inactive
@OvesN
OvesN temporarily deployed to copilot-pat-pool August 14, 2026 15:32 — with GitHub Actions Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the MSBuild TaskAnalyzer to surface the typed-parameter modernization diagnostics (MSBuildTask0006–MSBuildTask0008) as warnings instead of info, so they’re visible in typical build outputs and IDE diagnostic views when the analyzer is enabled. It also updates the Tasks project’s analyzer build configuration so these new warnings won’t break /warnaserror builds while existing issues are being addressed.

Changes:

  • Promote MSBuildTask0006–MSBuildTask0008 default severities from Info to Warning in the analyzer descriptors.
  • Update analyzer docs/release notes to reflect the new severities.
  • Extend Tasks project WarningsNotAsErrors (under BuildAnalyzer=true) and update tests to assert warning severity.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Tasks/Microsoft.Build.Tasks.csproj Adds MSBuildTask0006–0008 to WarningsNotAsErrors when BuildAnalyzer=true to prevent /warnaserror builds from failing while still emitting warnings.
src/TaskAnalyzer/README.md Updates the documented severities and severity-level explanation for MSBuildTask0006–0008.
src/TaskAnalyzer/DiagnosticDescriptors.cs Changes the default severity of MSBuildTask0006–0008 descriptors to Warning.
src/TaskAnalyzer/AnalyzerReleases.Unshipped.md Updates the unshipped rules table to reflect Warning severity for MSBuildTask0006–0008.
src/TaskAnalyzer.Tests/PreferTypedParameterAnalyzerTests.cs Adds assertions that emitted diagnostics for 0006/0007/0008 are Warning.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@OvesN
OvesN temporarily deployed to copilot-pat-pool August 14, 2026 15:39 — with GitHub Actions Inactive
@OvesN
OvesN temporarily deployed to copilot-pat-pool August 14, 2026 15:41 — with GitHub Actions Inactive

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — PR #14706: Promote typed parameter diagnostics to warnings

✅ 24/24 dimensions clean — no findings.

Summary: This PR promotes MSBuildTask0006, MSBuildTask0007, and MSBuildTask0008 from Info to Warning severity in the TaskAnalyzer NuGet package. The change is well-scoped and correctly mitigated:

  • Backward compatibility: Since AnalyzerReleases.Shipped.md shows no shipped releases yet, there are no existing consumers to break. The diagnostics only fire for tasks explicitly marked with [MSBuildMultiThreadableTask] (an opt-in attribute), limiting blast radius to task authors who have already adopted this annotation.
  • WarnAsError protection: The WarningsNotAsErrors addition in Microsoft.Build.Tasks.csproj correctly protects the Tasks project CI during the transition period.
  • Test coverage: All three promoted diagnostics (0006, 0007, 0008) have new Severity.ShouldBe(Warning) assertions.
  • Documentation: README.md and AnalyzerReleases.Unshipped.md are both updated consistently.

Generated by Expert Code Review (on open) for #14706 · sonnet46 · 59.4 AIC · ⌖ 7.62 AIC · ⊞ 5.3K

@OvesN
OvesN temporarily deployed to copilot-pat-pool August 14, 2026 15:42 — with GitHub Actions Inactive
@OvesN
OvesN merged commit 15bbfad into dotnet:main Aug 17, 2026
17 checks passed

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 0d5b5f2d Deployed Aug 14, 2026 by OvesN via conclusion #652
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.

3 participants