Skip to content

Vplita transitive violations - #14777

Draft
VolPlita wants to merge 2 commits into
dotnet:mainfrom
VolPlita:vplita-transitive-violations
Draft

Vplita transitive violations#14777
VolPlita wants to merge 2 commits into
dotnet:mainfrom
VolPlita:vplita-transitive-violations

Conversation

@VolPlita

Copy link
Copy Markdown
Contributor

Fixes #

Context

Changes Made

Testing

Notes

VolPlita added a commit that referenced this pull request Aug 26, 2026
…askItem<T> (#14811)

Part of #14078.

### Summary

Aligns TaskAnalyzer descriptor severities with the documented intent and
prevents an unsupported-type false positive when a task uses an open
generic `ITaskItem<T>` property.

This PR intentionally does **not** change `msbuild_task_analyzer.scope`.
The scope-policy implementation and tests belong to #14775 and are
excluded from this PR.

### Changes

- Changes MSBuildTask0006, MSBuildTask0007, and MSBuildTask0008 from
**Warning** to **Info**. These rules provide modernization suggestions
with code fixes; they do not report invalid task definitions.
- Changes MSBuildTask0010 from **Error** to **Warning**.
`Convert.ChangeType` binding succeeds, but its invariant-culture
behavior may not match the task's intended parsing semantics.
- Keeps MSBuildTask0009 as **Warning**, avoiding a new unconditional
build break for existing analyzer consumers.
- Skips MSBuildTask0009 for open generic `ITaskItem<T>` properties
because an unresolved type parameter does not provide enough information
to determine whether the closed task parameter will be supported.
- Updates `DiagnosticDescriptors.cs`, `AnalyzerReleases.Unshipped.md`,
the README, and analyzer tests so all severity declarations agree.
- Adds coverage showing typed task-item diagnostics apply to regular
tasks independently of MT opt-in and that open generic task-item
properties do not produce a diagnostic.

### Compatibility

The severity changes only reduce diagnostics from Warning/Error to
Info/Warning. No new warning or error is introduced, and analyzer scope
behavior is unchanged.

### Testing

- `.dotnet\dotnet.exe test
src\TaskAnalyzer.Tests\TaskAnalyzer.Tests.csproj -c Release`: 250
passed, 0 failed, 0 skipped.
- `.\build.cmd -v quiet`: succeeded with 0 warnings and 0 errors.

### Related

- #14775 owns the analyzer scope-policy change and is not reimplemented
here.
- MSBuildTask0005 redesign remains follow-up work in #14777.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

1 participant