Skip to content

Using of the deprecated method "Find" (DeprecatedFind)

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

Description

Method "Find" is deprecated. Use "StrFind" instead.

Examples

Incorrect:

If Find(Employee.Name, "Boris") > 0 Then

EndIf; 

Correct:

If StrFind(Employee.Name, "Boris") > 0 Then

EndIf; 

Snippets

Diagnostic ignorance in code

// BSLLS:DeprecatedFind-off
// BSLLS:DeprecatedFind-on

Parameter for config

"DeprecatedFind": false