提交 fc7f137f 编写于 作者: M Manish Vasani

Update check to static locals only

上级 bcd8c0ed
......@@ -394,11 +394,11 @@ private void AnalyzeOperationBlockEnd(OperationBlockAnalysisContext context)
// Bail out in following cases:
// 1. End user has configured the diagnostic to be suppressed.
// 2. Symbol has error type, hence the diagnostic could be noised
// 3. Symbol is static. For example, assignment to static locals in VB
// 3. Static local symbols. Assignment to static locals
// is not unnecessary as the assigned value can be used on the next invocation.
if (_options.UnusedValueAssignmentSeverity == ReportDiagnostic.Suppress ||
symbol.GetSymbolType().IsErrorType() ||
symbol.IsStatic)
symbol.IsStatic && symbol.Kind == SymbolKind.Local)
{
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册