Skip to content

[Built-in analyzer] Undefined property is used #9883

@ladipro

Description

@ladipro

Background

This issue tracks one of the BuildCheck analyzers we would like to ship in-box with MSBuild.

Goal

Implement an analyzer with the following rule: No property is used before it's defined, except for conditions.

Notes

A non-existent property is silently expanded to an empty string, which can lead to unexpected behavior. We would like to flag this as a violation, except for cases where the property is tested in a condition like so '$(MyProp)' == ''.

Implementation Update

Fully working prototype: #10009
For easier reviewing and less conflucts during other ongoing work, the payload will be delivered in 3 subsequent payloads:

Metadata

Metadata

Assignees

Labels

Area: BuildCheckBuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions