Questions tagged [code-documentation]

Documentation that focuses on code itself, such as its function, correct use, expected output, relationship to other code as well as database and tables connections, and usage examples.

381 questions
9
votes
2 answers

Swift annotation "Tag"

Since Objective-C I'm a fan of #pragma MARK: but recently I've seen /// -Tag: in Apple's source code. Also noteworthy, it's highlighted in white, while MARK isn't. Tag on the other side does not add any text to the Xcode 'outline' view. Can anyone…
Carsten
  • 1,029
  • 14
  • 29
9
votes
3 answers

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

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…
stk
  • 6,311
  • 11
  • 42
  • 58
9
votes
1 answer

Is there an analogue of GhostDoc in Visual Studio Code?

I'm looking for something like GhostDoc for VS Code (C#), but to no avail. Anyone knows anything? I've only found an "old" VS-like extension which makes XML comments available when you type '///', but it's not what I am looking for.
Burst
  • 689
  • 7
  • 15
9
votes
1 answer

NoMethodError: undefined method `match?' for "Ruby":String

I'm trying to check whether input from user matches RegEx [a-zA-z] so I've checked the docs for proper method. I found match? in Ruby-doc.org and copied the example shown in docs to irb, but instead of true I'm getting this: 2.3.3 :001 >…
ToTenMilan
  • 582
  • 1
  • 9
  • 19
9
votes
1 answer

How to explicitly document that a method does not throw exceptions

Using XML comments in C#, I can document that a method may throw an exception: Thrown if foo is invalid. However, if a method has no exception tag in its XML documentation, this may mean one of two…
Daniel Wolf
  • 12,855
  • 13
  • 54
  • 80
9
votes
0 answers

How can I get the tag to use C# keywords rather than VB keywords?

I'm documenting C# code using XML and Sandcastle Help File Builder to generate HtmlHelp1 help files. I've set the SyntaxFilters property on the Sandcastle project to CSharp as I only want to generate code syntax relevant to C#. I'm making use of the…
Dan Stevens
  • 6,392
  • 10
  • 49
  • 68
9
votes
3 answers

How to create a comment to an oracle database view

I would really like to create a comment to a view with a short description of its purpose. Unfortunately it is not possible to create comments to views in oracle. This feature is only for tables, columns and materialized views available. I would…
eglobetrotter
  • 718
  • 4
  • 10
  • 25
8
votes
2 answers

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

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…
David
  • 15,750
  • 22
  • 90
  • 150
8
votes
6 answers

Most common docblock for Delphi and/or FreePascal code

I'm quite familiar with PHP dockblocks since it's been my job for the last 15+ years. /** * Description * * @tag bla bla * @tag more bla bla */ What I'm trying to understand is if there is a standard like that for Delphi and/or…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
8
votes
3 answers

Tool to compare function signature to docstring

Is there a tool that can check if the arguments listed in the docstring match the signature of the function call? It should be able to deal with numpy-style docstrings. I am regularly using R CMD CHECK, which finds documentation/code mismatches in R…
8
votes
1 answer

Python: how to embed all docstring help at package level help menu?

What I mean to ask is: TLDR: how do I have my package's help include all underlying docstrings? I have created a package. That package has all the proper __init__.py files and all the proper docstrings (module, function, class, and method level…
Mike Williamson
  • 4,915
  • 14
  • 67
  • 104
8
votes
0 answers

How to install documentation for c++ in xcode?

When using Swift or Objective-C in Xcode, Xcode provides a Quick Help tool in the Utilities section and by option-clicking something in your code. That way you can see some documentation about the thing you're clicking on. Is there a way to make…
JXD
  • 164
  • 7
8
votes
14 answers

Code documentation: How much is too much?

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…
Robert S.
  • 25,266
  • 14
  • 84
  • 116
8
votes
3 answers

Using Appledocs to generate documentation

I apologize for the simplicity of my question, but I was trying to generate documentation using Appledocs (https://github.com/tomaz/appledoc#quick-install) I'm not sure how exactly to get it setup. The way I do it is: I clone the github repo and…
7
votes
2 answers

Official recommendation / coding style guide on using multiple @throws tags for the same exception in JavaDoc

I just recently found out that one can use multiple @throws tags for the same exception in Javadoc. One of my students used it to document one of his methods in Connect Four: /* * ... * @throws IllegalArgumentException if the number of rows or…
Markus Weninger
  • 11,931
  • 7
  • 64
  • 137