Skip to content

BSL267 — Using external code tools

Summary

Using external code tools

Identifiers

Field Value
Rule code BSL267
Compatible alias UsingExternalCodeTools
Severity ERROR
Enabled by default Yes
Implemented Yes
Tags standard, design

Behavior

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

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

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

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

For application solutions it is forbidden to execute in unsafe mode any code on the 1C:Enterprise server that is not part of the application solution (configuration) itself. The restriction does not apply to the code that has passed the audit, and to the code executed on the client.

Examples of invalid execution of "external" code in unsafe mode:

  • external reports and processings (print forms, etc.)
  • configuration extensions

Restrictions

At the moment, the server context is not analyzed, so diagnostic works both at client and server contexts

Examples

Sources