Skip to content

BSL241 — Same metadata object and child name

Summary

Same metadata object and child name

Identifiers

Field Value
Rule code BSL241
Compatible alias SameMetadataObjectAndChildNames
Severity ERROR
Enabled by default Yes
Implemented Yes
Tags naming, design

Behavior

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

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

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

// BSLLS:SameMetadataObjectAndChildNames-off
// code without this diagnostic
// BSLLS:SameMetadataObjectAndChildNames-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 child metadata objects, such as attributes, dimensions, resources, tabular sections (and their attributes), it is not recommended to use names that match the names of the owner objects, since this can lead to errors in queries.

Examples

Incorrect names

Catalog.Contractors.TabularSection.Contractors
InformationRegister.SubordinateDocuments.Dimension.SubordinateDocuments
Document.Container.TabularSection.Container. Attribute.Container

Sources