IDE0047 diagnostic is overly intrusive for a minor stylistic issue
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
Originally filed here: https://github.com/microsoft/vscode-dotnettools/issues/2682
**Description**
The IDE0047 (“Remove redundant parentheses”) diagnostic is too visually imposing for what is a very subtle, purely stylistic suggestion. Currently, the entire parenthesized expression is grayed out, which is distracting and disproportionate to the severity of the issue. This makes code harder to read and draws unnecessary attention to a very minor stylistic issue.
**Expected behavior**
The diagnostic should be more subtle. Ideally, only the redundant parentheses themselves should be highlighted. If highlighting both parentheses is not technically feasible, highlighting just a single parenthesis would still be preferable to dimming the entire expression.
**Actual behavior**
The whole parenthesized expression is grayed out instead of just the redundant parentheses.
**Prior art**
JetBrains IDEs implement “Remove redundant parentheses” in a much less intrusive way and provide a better user experience for the same feature:
---
Extension version: 1.90.2
VS Code version: Code 1.108.0 (Universal) (94e8ae2b28cb5cc932b86e1070569c4463565c37, 2026-01-08T13:53:10.781Z)
OS version: Darwin arm64 24.6.0
Modes:
Contributor guide
Research direction
Start by locating the Roslyn implementation and tests for the IDE0047 diagnostic, then reproduce the current highlighting in the editor. Compare the rendered result with the expected behavior in the issue: the redundant parentheses should be highlighted without graying out the entire parenthesized expression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100