-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Built-in analyzer] Undefined property is used #9883
Copy link
Copy link
Closed
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'triaged
Description
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:
- Expander refactoring Expander refactoring [property tracking analyzers prerequisity] #10102
- Wiring the data Wire up the properties reading/writing via loggingContexts #10237
- Actuall BuildCheck implementation - this is blocked by:
Reactions are currently unavailable
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'triaged