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

Bug 485573

Summary: Don't annotate unnecessary-nls on lines that are commented out entirely
Product: [ECD] Orion Reporter: Carolyn MacLeod <Carolyn_MacLeod>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public
Version: unspecified   
Target Milestone: 11.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Carolyn MacLeod CLA 2016-01-11 13:20:33 EST
Modify the unnecessary-nls rule to not put annotations on lines that are fully commented out.
Comment 1 Curtis Windatt CLA 2016-01-11 18:02:19 EST
I can get the characters before the comment using node.sourceFile.text and checking at the comment start range.  This works in HTML files too.  When the comment is at the start of the line we will ignore.  But what about these two cases:

1) Where the non-nls tag is the only thing on the line
//$NON-NLS-2$
2) Where there is whitespace before the comment on the line
     // foo('test') //$NON-NLS-1$
3) 1/2 combined
     //$NON-NLS-1$