vscode-todo-parser icon indicating copy to clipboard operation
vscode-todo-parser copied to clipboard

todo-parser shows @returns at the report

Open mlc-mlapis opened this issue 9 years ago • 2 comments

Hi,

when I use the following JsDoc syntax in JS source file:

/**
 * @description - Removing an ordered product from a bin with a dialog confirmation.
 * @param {string} _idProductOrder - Unique key of an ordered product.
 * @todo ML - Discuss to be sure that '_idProductOrder' is not only an id of a product.
 * @returns void
 */

the following report is displayed -> "@returns void" is something what should not be included in it:

1.
From c:\Data\Projects\....\OrderedProductsPanel.component.ts:110
----------------------------------
@todo ML - Discuss to be sure that '_idProductOrder' is not only an id of a product.
@returns void

My config:

"TodoParser": {
        "exclude": ["cpp", "c"],
        "folderExclude": ["node_modules", ".vscode", "typings"],
        "markers": ["@todo"]
}

Environment:

  • Windows 8.1
  • node 0.12.15
  • VS Code 1.4.0
  • todo-parser 1.7.2

mlc-mlapis avatar Aug 25 '16 21:08 mlc-mlapis

The thing is it is difficult to know that the line starting with @return (or any other phrase) is not a part of the todo above. Currently you can insert a blank line just above @return to signal the end of a todo.

prestonph avatar Aug 31 '16 07:08 prestonph

OK, yes it could be. But @returns is a reserved keyword in JsDoc (... typedoc, ...) syntax (as others beginning on @) so I suppose that nobody will use this for other custom cases because it is a standard to create documentation from code by this way.

mlc-mlapis avatar Aug 31 '16 07:08 mlc-mlapis