code-documentation

How to document return in JavaScript

会有一股神秘感。 提交于 2019-12-03 16:27:26
问题 I'm writing my own library for the project at work for a browser application and I am having the same old problem deciding how to comment the code. I'm trying to follow the JsDoc syntax, but will probably continue the Google Closure Compiler way. I may end up using two @return and @returns tags in the documentation, just for portability sake (when I setup the auto-generation of the documentation). Now, the question, how do you document the return of a custom anonymous object from a function?

Documenting Node.js projects [closed]

风流意气都作罢 提交于 2019-12-02 14:06:21
I'm currently using JSDoc Toolkit to document my code, but it doesn't quite fit - namely, it seem to struggle with describing namespaces properly. Say you have two simple classes in each their files: lib/database/foo.js : /** @class */ function Foo(...) {...} /** @function ... */ Foo.prototype.init(..., cb) { return cb(null, ...); }; module.exports = foo; And then something inherited lib/database/bar.js : var Foo = require('./foo'); /** * @class * @augments Foo */ function Bar(....) {...} util.inherits(Bar, Foo); Bar.prototype.moreInit(..., cb) { return cb(null, ...); }; In the generated

Google Apps Script Auto Generated Library Documentation

Deadly 提交于 2019-12-02 00:50:37
问题 I am currently developing a Library for Google Apps Script that basically treats a spreadsheet as a database object. Currently, the library has a two identical functions like /** * Opens and creates a query object for a spreadsheet with the given url. * * @param {String} the url of the spreadsheet * @return {SpreadsheetQuery_} a spreadsheet query object for the given spreadsheet */ function openByUrl(url) { return new SpreadsheetQuery_(SpreadsheetApp.openByUrl(url)); } now, for the two public

Google Apps Script Auto Generated Library Documentation

≯℡__Kan透↙ 提交于 2019-12-01 21:16:13
I am currently developing a Library for Google Apps Script that basically treats a spreadsheet as a database object. Currently, the library has a two identical functions like /** * Opens and creates a query object for a spreadsheet with the given url. * * @param {String} the url of the spreadsheet * @return {SpreadsheetQuery_} a spreadsheet query object for the given spreadsheet */ function openByUrl(url) { return new SpreadsheetQuery_(SpreadsheetApp.openByUrl(url)); } now, for the two public functions, the documentation generated only shows the return type and not the parameter nor the

How can I show C++ code documentation in Xcode 9.3?

放肆的年华 提交于 2019-12-01 04:19:02
I´m developing software based on C++ in Xcode and want to have (at least) the same convenience for code documentation as if I was developing for Swift or objc. Example: std::string myString("hello"); if (myString.empty()) { // do something } If I want to know exactly what .empty() does, I would like to Option-Click on the function and get the documentation overlay with information from e.g. http://en.cppreference.com/w/cpp/string/basic_string/empty , exactly as it does for objc and Swift. How is this possible? Current output just looks like this: You cannot. According to Apple's Xcode release

ReSharper - how to disable generation of rubbish documentation headers in Code Cleanup

半世苍凉 提交于 2019-12-01 00:49:25
问题 We're using ReSharper 6.0 with StyleCop for ReSharper. Although we use the StyleCop rule that members must have documentation headers, we don't want ReSharper's code cleanup facility to generate documentation headers for us, because they're inevitably rubbish. Bad doc headers are worse than none at all because they're less likely to be updated than added in the first place. We tried turning off the setting 'Insert text into documentation and file headers' in ReSharper => Options => Tools =>

Visual Studio XML summary comment on single line

≡放荡痞女 提交于 2019-11-30 17:46:57
In Visual Studio, how do I change the default XML summary comment snippet from three lines to one line? Currently it provides this snippet when I type /// : /// <summary> /// /// </summary> I would like this shorter snippet: ///<summary></summary> My summaries are often brief and the extra 2 line are unnecessary. Is there a configuration setting for this or some customizable code/custom addon to fix this. This is an older question, but I liked Jason Williams's suggestion of creating a snippet for this, so I did. Not very complicated, but copy-and-paste is even easier :) <?xml version="1.0"

Visual Studio XML summary comment on single line

六眼飞鱼酱① 提交于 2019-11-30 16:44:41
问题 In Visual Studio, how do I change the default XML summary comment snippet from three lines to one line? Currently it provides this snippet when I type /// : /// <summary> /// /// </summary> I would like this shorter snippet: ///<summary></summary> My summaries are often brief and the extra 2 line are unnecessary. Is there a configuration setting for this or some customizable code/custom addon to fix this. 回答1: This is an older question, but I liked Jason Williams's suggestion of creating a

Code documentation: How much is too much?

自作多情 提交于 2019-11-30 09:07:12
How much code documentation in your .NET source is too much? Some background: I inherited a large codebase that I've talked about in some of the other questions I've posted here on SO. One of the "features" of this codebase is a God Class, a single static class with >3000 lines of code encompassing several dozen static methods. It's everything from Utilities.CalculateFYBasedOnMonth() to Utilities.GetSharePointUserInfo() to Utilities.IsUserIE6() . It's all good code that doesn't need to be rewritten , just refactored into an appropriate set of libraries. I have that planned out. Since these

What do the three arrow (“>>>”) signs mean?

余生颓废 提交于 2019-11-30 08:03:08
So this is probably a dumb question, but I have now been searching for quite some time, and I haven't been able to figure out what they do even though I see them often in source-codes. You won't see it in source code, it's probably documentation. It indicates an interactive session, and things typed into the 'interpreter' are marked with this. Output is shown without the arrows. In fact, the python documentation often has a button >>> at the top right of example code to be able to hide the arrows (and output) so that you can copy and paste the code. Shown: Hidden: '>>>' is the prompt of the