Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 496202

Summary: [quickfix][eslint] Quickfix for gratuitous parentheses doesn't work if the closing parenthesis is on the next line.
Product: [ECD] Orion Reporter: Olivier Thomann <Olivier_Thomann>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Michael_Rennie
Version: 11.0Flags: Michael_Rennie: review+
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed patch including regression tests none

Description Olivier Thomann CLA 2016-06-15 12:54:43 EDT
var s = (
4 + 5
);

When you enable the rule "no-extra-parens", you get a warning for (4 + 5). But because the closing parenthesis is on the next line, the quickfix doesn't work.
Comment 1 Olivier Thomann CLA 2016-06-15 13:10:27 EDT
Created attachment 262467 [details]
Proposed patch including regression tests
Comment 2 Olivier Thomann CLA 2016-06-15 13:30:38 EDT
If there is a space between the closing parenthesis and the previous character, the same problem arises. The quickfix doesn't apply. I will update the patch to include a regression test for that case as well. The fix is the same.
Comment 3 Olivier Thomann CLA 2016-06-15 13:33:51 EDT
Delivered. This is more common than expected. Michael, please review.