dotnet/roslyn

Issue with "Avoid expression statements that implicitly ignore value" code style fixer

Open

#61,467 创建于 2022年5月23日

在 GitHub 查看
 (5 评论) (5 反应) (0 负责人)C# (4,257 fork)batch import
Area-IDEBughelp wanted

仓库指标

Star
 (20,414 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

This issue has been moved from a ticket on Developer Community.


The Avoid expression statements that implicitly ignore value code style setting can be set to Unused local or Discard:

image

However, I think that these settings do not cover all the scenarios, because there are cases in which we simply want to ignore the return values. I have attached a recording to show such a situation, that is also available at https://www.youtube.com/watch?v=ZuSf84-Mw44.


Original Comments

Feedback Bot on 5/22/2022, 07:54 PM:

(private comment, text removed)


Original Solutions

(no solutions)

贡献者指南