| Summary: | The quick fix for "no-unused-params" failed to remove corresponding JSDoc comments. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Troy Tao <troytao> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public, Michael_Rennie |
| Version: | 11.0 | ||
| Target Milestone: | 12.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
New Gerrit change created: https://git.eclipse.org/r/67627 The gerrit change modifies every single line of the file. Line endings maybe? this also needs a regression test in quickfixTests.js. New Gerrit change created: https://git.eclipse.org/r/67631 If the doc comments are attached to a different node than what we are expecting, then we might need to fix for function declaractions and other node types. Will also need tests in case the comments are ever moved again (possible regression from updating Esprima). We ended up going with a simpler fix + tests: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=9789b89181b3ccc9ec14a14018917b180ef78d37 The fix also adds support for 'fix all' to the quickfix. |
To reproduce this bug, start with: var temp = { /** * @private * @param {String} text The code to parse. * @param {String} file The file name that we parsed * @returns {Object} The AST. */ parse: function(text, file) { return null; } }; Then click the quick fix for either "text" or "file": var temp = { /** * @private * @param {String} text The code to parse. * @param {String} file The file name that we parsed * @returns {Object} The AST. */ parse: function(file) { return null; } }; The "@param {String} text The code to parse." should also be deleted.