Skip to content

BSL153 — Canonical keyword writing

Summary

Canonical keyword writing

Identifiers

Field Value
Rule code BSL153
Compatible alias CanonicalSpellingKeywords
Severity INFORMATION
Enabled by default Yes
Implemented Yes
Tags convention, style

Behavior

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

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

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

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

A built-in language constructs, keywords must be written canonically.

Keywords

RU EN
ВызватьИсключение Raise
Выполнить Execute
ДобавитьОбработчик AddHandler
Для For
Если If
Знач Val
И AND, and
Из In
ИЛИ, Или OR, Or
Иначе Else
ИначеЕсли ElsIf
Исключение Except
Истина True
Каждого, каждого Each, each
КонецЕсли EndIf
КонецПопытки EndTry
КонецПроцедуры EndProcedure
КонецФункции EndFunction
КонецЦикла EndDo
НЕ, Не NOT, Not
Неопределено Undefined
Перейти Goto
Перем Var
По To
Пока While
Попытка Try
Процедура Procedure
Прервать Break
Продолжить Continue
Тогда Then
Цикл Do
УдалитьОбработчик RemoveHandler
Функция Function
Экспорт Export

Preprocessor instrutions

RU EN
ВебКлиент WebClient
ВнешнееСоединение ExternalConnection
Если If
И AND, And
ИЛИ, Или OR, Or
Иначе Else
ИначеЕсли ElsIf
КонецЕсли EndIf
КонецОбласти EndRegion
Клиент Client
МобильноеПриложениеКлиент MobileAppClient
МобильноеПриложениеСервер MobileAppServer
МобильныйКлиент MobileClient
НаКлиенте AtClient
НаСервере AtServer
НЕ, Не NOT, Not
Область Region
Сервер Server
Тогда Then
ТолстыйКлиентОбычноеПриложение ThickClientOrdinaryApplication
ТолстыйКлиентУправляемоеПриложение ThickClientManagedApplication
ТонкийКлиент ThinClient

Compilation directives

RU EN
НаКлиенте AtClient
НаСервере AtServer
НаСервереБезКонтекста AtServerNoContext
НаКлиентеНаСервереБезКонтекста AtClientAtServerNoContext
НаКлиентеНаСервере AtClientAtServer

Sources