Skip to content

BSL163 — Missed postfix "ClientServer"

Summary

Missed postfix "ClientServer"

Identifiers

Field Value
Rule code BSL163
Compatible alias CommonModuleNameClientServer
Severity INFORMATION
Enabled by default Yes
Implemented Yes
Tags convention, naming, module

Behavior

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

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

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

// BSLLS:CommonModuleNameClientServer-off
// code without this diagnostic
// BSLLS:CommonModuleNameClientServer-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

To avoid code duplication, it is recommended to create client-server common modules with methods whose contents are the same on the server and on the client. These modules have signs:

  • Client (Managed application)
  • Server (ServerCall is disabled)
  • Client (Ordinary application)
  • External connection

Common modules of this type are named with the "ClientServer" (rus. "КлиентСервер").

Examples

FilesClientServer, CommonClientServer, UsersClientServer

Sources

Standard: Rules for creating common modules (RU)