Skip to content

Deprecated methods should not be used (DeprecatedMethodCall)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Code smell BSL
OS
Minor Yes 3 deprecated
design

Description

In cases where it becomes necessary to mark a procedure (function) as deprecated, the word "Deprecated." Is placed in the first line of its description (rus. "Устарела.").

Use or extension of deprecated methods should be avoided. Marking method as deprecated is a warning that means the method will be removed in future versions and left for temporary backward compatibility.

Exception: It is possible to call deprecated methods from deprecated methods.

Examples

// Deprecated. Need to use NotDeprecatedProcedure.
Procedure DeprecatedProcedure()
EndProcedure

DeprecatedProcedure(); // Triggering diagnostics

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:DeprecatedMethodCall-off
// BSLLS:DeprecatedMethodCall-on

Parameter for config

"DeprecatedMethodCall": false