Skip to content

BSL196 — Global context method names collision

Summary

Global context method names collision

Identifiers

Field Value
Rule code BSL196
Compatible alias GlobalContextMethodCollision8312
Severity ERROR
Enabled by default Yes
Implemented Yes
Tags correctness, compatibility

Behavior

  • The public identifier BSL196 and alias GlobalContextMethodCollision8312 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 = ["BSL196"]
ignore = ["GlobalContextMethodCollision8312"]

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: BSL196
  • bsl-disable:
Value = "example";  // bsl-disable: BSL196
  • compatible BSLLS form:
Value = "example";  // BSLLS:GlobalContextMethodCollision8312-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: BSL196
// code without this diagnostic
// noqa-enable: BSL196

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

// BSLLS:GlobalContextMethodCollision8312-off
// code without this diagnostic
// BSLLS:GlobalContextMethodCollision8312-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 platform version 8.3.12 implements new methods of the global context, which may coincide with the configuration functions of the application solution.

Russian variant English variant
ПроверитьБит CheckBit
ПроверитьПоБитовойМаске CheckByBitMask
УстановитьБит SetBit
ПобитовоеИ BitwiseAnd
ПобитовоеИли BitwiseOr
ПобитовоеНе BitwiseNot
ПобитовоеИНе BitwiseAndNot
ПобитовоеИсключительноеИли BitwiseXor
ПобитовыйСдвигВлево BitwiseShiftLeft
ПобитовыйСдвигВправо BitwiseShiftRight

The configuration functions must either be renamed or deleted, replacing the call to them with the methods of the global context.

Examples

Sources