-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Area: BuildCheckBuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Suggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'
Description
Summary
We should have a check for calls of the Copy task that are batched, instead of in a single low-overhead parallelizable invocation.
Background and Motivation
One fairly common antipattern in builds is batching when not necessary. Copy is a great example--it can inherently handle most file-copying tasks in a single invocation and uses internal parallelism to copy things quickly, but it's sometimes easier to understand a batched invocation where a single file gets copied. But then you pay a performance cost for that forever.
Sample issue or antipattern that the check should be flagging
<ItemGroup>
<CopyInputs Include="SomeDirectory\**.txt" />
</ItemGroup>
<Target Name="BadCopyExample">
<Copy SourceFiles="%(CopyInputs.Identity)" DestinationFolder="SomeOutput" />
</Target>Sample output
No response
baronfel
Metadata
Metadata
Assignees
Labels
Area: BuildCheckBuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Suggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'