Skip to content

Initial version of properties analyzer#10457

Merged
JanKrivanek merged 9 commits intomainfrom
proto/props-buildcheck
Aug 9, 2024
Merged

Initial version of properties analyzer#10457
JanKrivanek merged 9 commits intomainfrom
proto/props-buildcheck

Conversation

@JanKrivanek
Copy link
Copy Markdown
Member

@JanKrivanek JanKrivanek commented Jul 29, 2024

Fixes #9883
Fixes #10427

Context

This is a proposal of multirule integrated internal build check that checks for:

  • Property being used without being initialized
  • Property being used before being initialized
  • Property being initialized but never used

Testing

Targetted unittests

UX

sample output from test for current proposal:

MSBUILD : warning : <path>\myProj.proj (24,10): BC0202: Property: [MyPropT2] first declared/initialized at [<path>\myProj.proj (26,1)] used before it was initialized.
MSBUILD : warning : <path>\myProj.proj (13,3): BC0203: Property: [MyProp13] was declared/initialized, but it was never used.
MSBUILD : warning : <path>\myProj.proj (13,3): BC0201: Property: [MyProp11] was accessed, but it was never initialized.

@JanKrivanek JanKrivanek marked this pull request as ready for review August 8, 2024 10:37
Copy link
Copy Markdown
Member

@surayya-MS surayya-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! made some suggestions but not critical

@JanKrivanek JanKrivanek enabled auto-merge (squash) August 9, 2024 15:01
@JanKrivanek JanKrivanek merged commit b7e76d1 into main Aug 9, 2024
@JanKrivanek JanKrivanek deleted the proto/props-buildcheck branch August 9, 2024 15:39
Copy link
Copy Markdown
Contributor

@Nirmal4G Nirmal4G left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to Submit the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [BuildCheck] [Documentation]: Default severity of build-in analyzer rules should be documented. [Built-in analyzer] Undefined property is used

4 participants