Skip to content

Function returned values description is missing (MissingReturnedValueDescription)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Code smell BSL
OS
Major Yes 5 standard
badpractice

Parameters

Name Type Description Default value
allowShortDescriptionReturnValues Boolean Allow short description of return values true

Description

The description of a method (procedure or function) should be formatted correctly to help programmers use the functionality correctly.

The function description must contain a description of the return value in the block of the same name. You must provide a description for all possible return types.

Diagnostics detects typical errors:

  • No return value description
  • Return value description for procedure
  • Poor description of the return value: when the type name is present in the description, but its description is not specified
  • To activate this more stringent check, you must turn off the short form permission by the diagnostic parameter

Examples

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:MissingReturnedValueDescription-off
// BSLLS:MissingReturnedValueDescription-on

Parameter for config

"MissingReturnedValueDescription": {
    "allowShortDescriptionReturnValues": true
}