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
2
votes
2 answers

Naming the arguments of functions that are themselves arguments in F#

Giving names to function arguments is a way of documenting our code; if there was no such need then we could give them names such as “arg1” and “arg2” and be no worse for it – but in reality this would of course make our code much harder to…
Bent
  • 63
  • 6
2
votes
2 answers

How can I save lines of C# code into a string?

I'm writing a series of tests to validate code I'm writing. I want the documentation for the tests to list how the tests are finding errors. Instead of making sure the documentation gets updated with the tests I'd like to output the line of code. Is…
2
votes
1 answer

Make doxygen accept no-documentation for an item (but not ignore it)

When you run doxygen, you often get a lot of: warning: some-thing-or-another is not documented. For some items, you just want to fill in the documentation; but other are too trivial to document, or I just want listing without documentation. Now,…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
0 answers

How to extend the documentation of a package's S3 method?

In my package, I'm extending an S3 method as_bar from the package pcp_pack, as applied on an object foo from my package foo_pack. The ROxygen2 documentation is the following: #' Implementation of as_bar for foo objects #' #' @param x same as…
Dan Chaltiel
  • 7,811
  • 5
  • 47
  • 92
2
votes
2 answers

Documenting MATLAB function overloading (variable arguments) so the usage popup is helpful

I'm writing MATLAB functions for use by others. I know how to use nargin, varargin, etc. to create a function with variable number of inputs. The function I'm currently writing is recursive and I need to pass an argument to handle the recursion,…
Travis Bemrose
  • 379
  • 1
  • 12
2
votes
0 answers

Adding Swagger API Documentation to Maven Site

I have a Spring Boot project and I'm using swagger to test and document the API. The project also contains a bunch of classes that are used as libraries and I'm using scala docs to document those. Is there a way to unify API docs (from swagger) and…
2
votes
1 answer

Overridden method documentation

I am working with C# and Visual Studio (2015, made no check on other versions). I have a problem with an overridden method for the code documentation. Please see following example public class BaseClass { public BaseClass() { } ///…
2
votes
0 answers

TsLint: Code documentation (comments) force to finish width dot ('.')

How can I configure my TsLint to force all comments finishes with a dot like the following example: /** * Defines the logo width in pixels. */ @Input() width: string; Follows my TsLint configuration: { "extends": "tslint:recommended", …
Ricardo Rocha
  • 14,612
  • 20
  • 74
  • 130
2
votes
1 answer

How to write proper documentation for Google Apps Scripts?

I am a marketer who is learning to code. Currently my main weapon of choice is Google Apps Scripts. As I am diving deeper and also writing code for other people, I want to make sure that my code is well documented. Before GAS, I started with Python,…
bende
  • 183
  • 4
  • 13
2
votes
1 answer

Cyrillic alphabet in help function from Python 3 don't work in Powershell Windows 10

I have this function: def decomposition(): """ Вызов модуля oval_decomposition.py для разложения OVAL xml на составные части - определения, объекты и т.д. Для корректного сбора модулем build необходима следующая секция …
DenisNovac
  • 621
  • 2
  • 8
  • 15
2
votes
1 answer

Usage of @Injectable class decorator on service provided by @Global module (in official documentation)

Questions about a ConfigService in documentation: https://docs.nestjs.com/techniques/configuration#service See the class definition there: export class ConfigService { /* ... */ } Why there is no @Injectable decorator? Is there any reason or just a…
Mateusz
  • 27
  • 3
2
votes
1 answer

How do I tell doxygen a function is "self-documenting"?

I'm using Doxygen for my (C++) project. I have some functions which are self-explanatory, for which I don't want to add any comment or explanation - but which I do want appearing as part of the documentation. Now, this does happen as doxygen's…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
1 answer

Incomplete method access modifier and/or non-access modifier in Android Documentation

I was studying Android's FileProvider API and noticed that while method getUriForFile is static, it is not declared as static in the documentation: Uri getUriForFile (Context context, String authority, File file) What am I…
SoSa
  • 105
  • 1
  • 8
2
votes
1 answer

Documenting error codes definition in Swagger API contract

Imagine you are working under following circumstances: You have REST API modules with API documentation generated into swagger-ui.html Possible HTTP status codes for endpoints are documented well via io.swagger.annotations.* on controller method…
2
votes
1 answer

Python urllib.request.Request parameter 'data' object type

I try to use urllib.request.Request (Python 3.6.7) to make an API call to a internal web services to get some json results. I need to send some data and headers to the server, so I use the urllib.request.Request class to do this. For the input of…
sylye
  • 453
  • 2
  • 5
  • 17