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
12
votes
1 answer

How do you document AngularJS directives?

Are there any ad hoc standards or tools for documenting AngularJS directives? We're explicitly building pieces of reusable functionality, so we should be able to get their interfaces across to developers. I've seen a couple of things: Swagger. I…
fool4jesus
  • 2,147
  • 3
  • 23
  • 34
11
votes
2 answers

How to get a "help" functionality in REPL

When I use REPL, I sometimes need to look up how a function functions e.g. splice. I usually go to the documentation website. But I don't always have internet and it'd be good if I could write help("splice") or something (e.g. splice?) in the REPL…
user15750474
11
votes
1 answer
11
votes
1 answer

doxygen is generating empty documentation

I have a source repository in C++ (and some CUDA), which I want to doxygenate. I've added doxygen comments to some - but not all - of the code; generated a Doxygen config file, and ran doxygen with it to see some partial output. What I get is:…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
11
votes
4 answers

ReactJS writing stateless function comments

What is the recommended way of writing comments for ReactJS stateless functions? Let say I have the following code: export const LoginForm = ({ submitting, handleSubmit }) => (
...(code)...
)); How…
jmarceli
  • 19,102
  • 6
  • 69
  • 67
11
votes
2 answers

TypeHint for collection in Enunciate

I have some REST services (consuming and producing application/json) and I use @TypeHint to generate documentation. Now I have something like this: import javax.ws.rs.core.Response; ... @Path("/path") public class MyClass { @GET …
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
11
votes
2 answers

PHPDoc: Typehint in nested arrays (with e.g. 2 dimensions)

Is there a correct way to document values/objects in arrays which are within another dimension? Normally an array will be handled like this: /** @var ClassName[] $Array */ $Array = array( $InstanceOfClassName,.. ) But i need something like…
DerDu
  • 688
  • 1
  • 13
  • 25
10
votes
1 answer

How to reference type parameter in XML documentation?

How do you reference a type parameter in XML code documentation? For instance, this code /// /// An interface. /// /// Type paramter. public interface IFace { ///…
BurnsBA
  • 4,347
  • 27
  • 39
10
votes
4 answers

In Perl 6, is there a way to get the Pod declarator block that is attached to a specific multi sub candidate?

Perl 6 has a cool feature which allows one to get any Pod declarator block that is attached to a subroutine (or class, role, etc.), using the WHY method: #|(Some enlightening words about myfunc.) sub myfunc (Int $i) { say "You provided an integer:…
Enheh
  • 227
  • 2
  • 9
10
votes
2 answers

Should I write multiple @return tags in javadoc

Say I have a java method that returns an array of strings. Inside the method, I have more than one return statements, depending on conditions. public String[] userLogIn() { String[] success = {"You", "are", "the", "king"}; String[] errorMsg…
user3207158
  • 619
  • 2
  • 5
  • 22
10
votes
2 answers

Is this an off-by-one bug in Java 7?

I don't know where to seek clarifications and confirmations on Java API documentation and Java code, so I'm doing it here. In the API documentation for FileChannel, I'm finding off-by-one errors w.r.t. to file position and file size in more places…
Harry
  • 3,684
  • 6
  • 39
  • 48
10
votes
2 answers

Disable Automatic File Header Creation (ReSharper and StyleCop)

I recently installed R# 6.1 (C# version, not Full) with StyleCop 4.7.34.0 (with the R# plugin). When adding a new class to a project, the file header information is automatically added. How do you disable this? I've turned off the checkbox for…
ryan
  • 481
  • 7
  • 11
9
votes
2 answers

.NET Core Reference Source

I was searching for the source code of .NET Core because I wanted to look at how the core classes are implemented. For example, I wanted to see how the string class is written. Can someone please point me to the source code of .NET Core? There…
ihimv
  • 1,308
  • 12
  • 25
9
votes
2 answers

What is the purpose of boolean values for the breakpoint props (xs, sm, md...) in material-ui

I am struggling to find documentation on (or results via experimenting with code) what the purpose is of having booleans as values for breakpoint props for the grid component in material-ui. Consulting the grid api documentation reveals that…
45674567
  • 93
  • 1
  • 3
9
votes
1 answer

Kotlin: How can I reference a method in kDoc using @see?

I used to reference methods in Java Doc like this: /** * @see com.myapp.view.fragment.PlaybackControlFragment#onPlaybackStateChanged */ I don't know how to reference same method in kotlin? The part com.myapp.view.fragment.PlaybackControlFragment…
VSB
  • 9,825
  • 16
  • 72
  • 145
1 2
3
25 26