Skip to content

BSL065 — Function returned values description is missing

Summary

Function returned values description is missing

Identifiers

Field Value
Rule code BSL065
Compatible alias MissingReturnedValueDescription
Severity INFORMATION
Enabled by default Yes
Implemented Yes
Tags design, documentation

Behavior

  • The public identifier BSL065 and alias MissingReturnedValueDescription are stable.
  • The rule reports the cases documented on this page.
  • Suppressions and project configuration are applied before publication.
  • The rule requires neither an external analyzer nor network access.

Configuration and suppression

BSL### is the primary stable identifier. The compatible alias is accepted in select, ignore, and compatible block suppression comments.

[tool.onec-hbk-bsl]
select = ["BSL065"]
ignore = ["MissingReturnedValueDescription"]

All three suppression families support both a current line and a range. When an opening comment follows code, it affects only that line. Use any one form:

  • noqa:
Value = "example";  // noqa: BSL065
  • bsl-disable:
Value = "example";  // bsl-disable: BSL065
  • compatible BSLLS form:
Value = "example";  // BSLLS:MissingReturnedValueDescription-off

When the same opening comment is on a line by itself, it starts a range. Close it with the matching marker from the same family:

// noqa: BSL065
// code without this diagnostic
// noqa-enable: BSL065

// bsl-disable: BSL065
// code without this diagnostic
// bsl-enable: BSL065

// BSLLS:MissingReturnedValueDescription-off
// code without this diagnostic
// BSLLS:MissingReturnedValueDescription-on

To disable the rule until the end of the file, omit the closing noqa-enable, bsl-enable, or BSLLS:…-on marker.

Opening and closing markers must belong to the same family.

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