IntelliTect / IntelliTect/CodingGuidelines
Add analyzer that flags var in pattern matching
Đang mở
enhancement
- Ngôn ngữ chính
- C#
- Star
- 12
- Fork
- 16
- Merge trung bình
- 2 phút
- Pull request đã merge (30 ngày)
- 7
Mô tả
Based on internal discussion.
Pattern matching with var provides little value since it effectively matches everything and ends up copying to a local value.
Match on this
```
if ( bar is var foo )
```
Suggested code change (just to help educate people)
```
var foo = bar;
if ( true )
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.