WiseTechGlobal / WTG.Analyzers

Analyzers from WiseTech Global to enforce our styles, behaviours, and prevent common mistakes.
Other
16 stars 3 forks source link

Discard var #107

Closed brian-reichle closed 4 years ago

brian-reichle commented 4 years ago

Closes #103

Was originally going to just check for situations that could result in a local defined with the name _ when the developer likely wanted the discard. I eventually decided to include anything that might result in a local/parameter defined with the name _ as that can affect the behaviour of later code that tries to use the discard. I decided to ignore class level symbols (fields/properties/etc) because their naming tends to be more explicit and there are normally other existing rules governing their name.