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

Bug 496207

Summary: [quickfix][eslint] quickfix for "no-self-assign" doesn't work in some cases
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, steve_northover
Version: 11.0Flags: curtis.windatt.public: review+
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed patch including updated regression tests none

Description Olivier Thomann CLA 2016-06-15 13:51:09 EDT
var foo = 10; foo = foo;
If you define that code and you run the quickfix you end up with:
var foo = 10; ;

Which is not that good. We should remove the trailing ';'. I would expect:
var foo = 10; 

var foo = foo;

If you define that code, the quickfix doesn't do anything. I would expect to get:
var foo;
Comment 1 Olivier Thomann CLA 2016-06-15 14:23:25 EDT
Delivered.
Comment 2 Olivier Thomann CLA 2016-06-15 14:23:55 EDT
Created attachment 262468 [details]
Proposed patch including updated regression tests
Comment 3 Curtis Windatt CLA 2016-06-15 14:37:57 EDT
+1 works with weird whitespace, works with quickfix all, works nested inside functions/blocks.