Vplita transitive violations - #14777
Draft
VolPlita wants to merge 2 commits into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
Context
Changes Made
Testing
Notes