msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Change throwaway parameter to include out and add test

Open Forgind opened this issue 1 year ago • 1 comments

Fixes #10435

Context

#10209 was generous with what it interpreted as a throwaway parameter: underscores were often misinterpreted as throwaway parameters. This changes it to require out _ instead of just _, which should resolve the problem.

Changes Made

Look for out _ instead of just _

Testing

Created a new unit test to distinguish between _ and out _

Notes

Alternative to #10435

I searched github for all instances of out _ in .props, .targets, and .*proj files and found none that seemed problematic, giving me some confidence in this change. I also looked for instances of _ in .targets files and found plenty of examples that were broken with #10209, indicating that that search would've prevented this problem.

@rainersigwald, leaving this as a draft until you've had a chance to try to think of potential problems with this approach. I was satisfied with my github search.

Forgind avatar Jul 23 '24 21:07 Forgind

@rainersigwald,

I haven't come up with any more ways that this is broken; have you?

Forgind avatar Aug 15 '24 23:08 Forgind