IntelliTect / IntelliTect/CodingGuidelines

Add analyzer that flags var in pattern matching

オープン
#52 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
C#
スター
12
フォーク
16
平均マージ
2分
マージ済み PR(30日)
7

説明

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 )
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。