Wikunia / brackets-FuncDocr

FuncDocr generates JS/PHPDoc annotations for your functions
101 stars 14 forks source link

Annotate with @return rather than @returns for the javascript Closure Compile #60

Open KenRud opened 9 years ago

KenRud commented 9 years ago

I am writing my javascript code to be compiled against the Google Closure Compiler. The Closure Compiler is expecting me to annotate my functions' return value with "@return" rather than "@returns" (notice the pluralization). Is there anyway that I can configure this extension to automatically output the singular form rather than having to manually correct it every time?

KenRud commented 9 years ago

Here is the Closure Compiler annotation specification for reference: https://developers.google.com/closure/compiler/docs/js-for-compiler

Wikunia commented 9 years ago

At the moment it isn't that nice to overwrite :/ But you can change this line: https://github.com/Wikunia/brackets-FuncDocr/blob/master/main.js#L490

KenRud commented 9 years ago

Hmmm, maybe if it was added as a configuration option that was read from brackets.json? If you want, assuming I have time, maybe I can add that little feature and send a pull request.

Wikunia commented 9 years ago

Yes it would be possible to add that to the settings menu.

Hirse commented 9 years ago

Notice that @returns is not a pluralization but a conjugation as in

The function returns a value.

KenRud commented 9 years ago

Minor mistake, thanks for the correction.

stowball commented 8 years ago

It seems that everything else uses @return instead of @returns: http://www.phpdoc.org/docs/latest/references/phpdoc/tags/return.html, https://github.com/Warin/Sublime/tree/master/DocBlockr, https://github.com/spadgos/sublime-jsdocs

My Sublime-using colleagues keep whinging at me