Diagnostic rules¶
This reference is generated from the onec-hbk-bsl runtime registry. Every
rule code links to its single page with usage documentation, examples,
configuration, and suppressions.
Identifiers¶
BSL###is the stable identifier used in output,select,ignore,onec-hbk-bsl.toml, SARIF/JSON, and// noqa: BSL###.- The compatible alias is accepted in input configuration and
// BSLLS:<RuleName>-off/oncomments; output always usesBSL###. - Identifiers are stable but are not necessarily contiguous.
Catalog¶
| Code | Alias | Default | Severity | Description | Tags |
|---|---|---|---|---|---|
BSL001 |
ParseError |
Yes | ERROR | Source code parse error | syntax |
BSL002 |
MethodSize |
Yes | ERROR | Method size | size, brain-overload |
BSL003 |
NonExportMethodsInApiRegion |
Yes | INFORMATION | Non export methods in API regions | design, api |
BSL004 |
EmptyCodeBlock |
Yes | ERROR | Empty code block | error-handling |
BSL005 |
UsingHardcodeNetworkAddress |
Yes | WARNING | Using hardcode ip addresses in code | security, hardware-related |
BSL006 |
UsingHardcodePath |
Yes | WARNING | Using hardcode file paths in code | security, hardware-related |
BSL007 |
UnusedLocalVariable |
Yes | WARNING | Unused local variable | unused |
BSL008 |
TooManyReturns |
Yes | WARNING | Methods should not have too many return statements | brain-overload |
BSL009 |
SelfAssign |
Yes | WARNING | Variable is assigned to itself | suspicious |
BSL011 |
CognitiveComplexity |
Yes | WARNING | Cognitive complexity | brain-overload, complexity |
BSL012 |
UsingHardcodeSecretInformation |
Yes | ERROR | Storing confidential information in code | security, credentials |
BSL013 |
CommentedCode |
Yes | WARNING | Commented out code | unused |
BSL014 |
LineLength |
Yes | INFORMATION | Line Length limit | design |
BSL015 |
NumberOfOptionalParams |
Yes | WARNING | Limit number of optional parameters in method | design, brain-overload |
BSL016 |
NonStandardRegion |
Yes | INFORMATION | Non-standard region of module | convention |
BSL017 |
CommandModuleExportMethods |
Yes | WARNING | Export methods in command and general command modules | design |
BSL019 |
CyclomaticComplexity |
Yes | WARNING | Cyclomatic complexity | brain-overload, complexity |
BSL020 |
NestedStatements |
Yes | WARNING | Control flow statements should not be nested too deep | brain-overload |
BSL022 |
UsingModalWindows |
Yes | WARNING | Using modal windows | deprecated, ui |
BSL023 |
UsingServiceTag |
Yes | INFORMATION | Using service tags | convention |
BSL024 |
SpaceAtStartComment |
Yes | INFORMATION | Space at the beginning of the comment | convention, style |
BSL025 |
EmptyStatement |
Yes | WARNING | Empty statement | syntax, convention |
BSL026 |
EmptyRegion |
Yes | INFORMATION | The region should not be empty | unused |
BSL027 |
UsingGoto |
Yes | WARNING | "goto" statement should not be used | design, brain-overload |
BSL028 |
MissingCodeTryCatchEx |
Yes | INFORMATION | Missing code in Raise block in "Try ... Raise ... EndTry" | error-handling, robustness |
BSL029 |
MagicNumber |
Yes | INFORMATION | Magic numbers | convention, readability |
BSL030 |
SemicolonPresence |
Yes | INFORMATION | Statement should end with semicolon symbol ";" | convention, style |
BSL031 |
NumberOfParams |
Yes | WARNING | Number of parameters in method | design, brain-overload |
BSL032 |
FunctionShouldHaveReturn |
Yes | WARNING | The function should have return | suspicious, design |
BSL033 |
CreateQueryInCycle |
Yes | WARNING | Execution query on cycle | performance, brain-overload |
BSL035 |
DuplicateStringLiteral |
Yes | INFORMATION | Duplicate string literal | convention, readability |
BSL036 |
IfConditionComplexity |
Yes | WARNING | Usage of complex expressions in the "If" condition | brain-overload, complexity |
BSL039 |
NestedTernaryOperator |
Yes | WARNING | Nested ternary operator | brain-overload, readability |
BSL040 |
UsingThisForm |
Yes | INFORMATION | Using deprecated property "ThisForm" | design, ui |
BSL041 |
DeprecatedMessage |
Yes | WARNING | Restriction on the use of deprecated "Message" method | deprecated, ui |
BSL042 |
UnusedLocalMethod |
Yes | WARNING | Unused local method | design, api |
BSL047 |
MagicDate |
Yes | INFORMATION | Magic dates | design, date-time |
BSL051 |
UnreachableCode |
Yes | WARNING | Unreachable Code | suspicious, dead-code |
BSL052 |
IdenticalExpressions |
Yes | WARNING | There are identical sub-expressions to the left and to the right of the "foo" operator | suspicious, logic |
BSL054 |
ExportVariables |
Yes | INFORMATION | Ban export global module variables | design, global-state |
BSL055 |
ConsecutiveEmptyLines |
Yes | INFORMATION | Consecutive empty lines | style, formatting |
BSL060 |
DoubleNegatives |
Yes | WARNING | Double negatives | brainoverload, badpractice |
BSL062 |
UnusedParameters |
Yes | WARNING | Unused parameter | unused, design |
BSL064 |
ProcedureReturnsValue |
Yes | ERROR | Procedure should not return Value | correctness, design |
BSL065 |
MissingReturnedValueDescription |
Yes | INFORMATION | Function returned values description is missing | design, documentation |
BSL066 |
DeprecatedFind |
Yes | WARNING | Using of the deprecated method "Find" | deprecated, compatibility |
BSL077 |
SelectTopWithoutOrderBy |
Yes | WARNING | Using 'SELECT TOP' without 'ORDER BY' | performance, maintainability |
BSL097 |
DeprecatedCurrentDate |
Yes | WARNING | Using of the deprecated method "CurrentDate" | standard, deprecated, unpredictable |
BSL131 |
DuplicateRegion |
Yes | INFORMATION | Duplicate regions | style |
BSL148 |
AllFunctionPathMustHaveReturn |
Yes | ERROR | All execution paths of a function must have a Return statement | error-handling, correctness |
BSL149 |
AssignAliasFieldsInQuery |
Yes | INFORMATION | Assigning aliases to selected fields in a query | convention, query |
BSL150 |
BadWords |
Yes | WARNING | Prohibited words | convention |
BSL151 |
BeginTransactionBeforeTryCatch |
Yes | ERROR | Violating transaction rules for the 'BeginTransaction' method | standard |
BSL152 |
CachedPublic |
Yes | WARNING | Cached public methods | design, performance |
BSL153 |
CanonicalSpellingKeywords |
Yes | INFORMATION | Canonical keyword writing | convention, style |
BSL154 |
CodeAfterAsyncCall |
Yes | WARNING | Lines of code after the asynchronous method call | async, correctness |
BSL155 |
CodeBlockBeforeSub |
Yes | ERROR | Method definitions must be placed before the module body operators | error |
BSL156 |
CodeOutOfRegion |
Yes | INFORMATION | Code out of region | convention, structure |
BSL157 |
CommitTransactionOutsideTryCatch |
Yes | ERROR | Violating transaction rules for the 'CommitTransaction' method | transaction, error-handling |
BSL158 |
CommonModuleAssign |
Yes | ERROR | CommonModuleAssign | correctness, module |
BSL159 |
CommonModuleInvalidType |
Yes | ERROR | Common module invalid type | design, module |
BSL160 |
CommonModuleMissingAPI |
Yes | INFORMATION | Common module should have a programming interface | design, module, api |
BSL161 |
CommonModuleNameCached |
Yes | INFORMATION | Missed postfix "Cached" | convention, naming, module |
BSL162 |
CommonModuleNameClient |
Yes | INFORMATION | Missed postfix "Client" | convention, naming, module |
BSL163 |
CommonModuleNameClientServer |
Yes | INFORMATION | Missed postfix "ClientServer" | convention, naming, module |
BSL164 |
CommonModuleNameFullAccess |
Yes | INFORMATION | Missed postfix "FullAccess" | convention, naming, module |
BSL165 |
CommonModuleNameGlobal |
Yes | INFORMATION | Missed postfix "Global" | convention, naming, module |
BSL166 |
CommonModuleNameGlobalClient |
Yes | INFORMATION | Global module with postfix "Client" | convention, naming, module |
BSL167 |
CommonModuleNameServerCall |
Yes | INFORMATION | Missed postfix "ServerCall" | convention, naming, module |
BSL168 |
CommonModuleNameWords |
Yes | INFORMATION | Unrecommended common module name | convention, naming, module |
BSL169 |
CompilationDirectiveLost |
Yes | ERROR | Methods compilation directive | correctness, directive |
BSL170 |
CompilationDirectiveNeedLess |
Yes | INFORMATION | Needless compilation directive | redundant, directive |
BSL171 |
CrazyMultilineString |
Yes | INFORMATION | Crazy multiline literals | style, readability |
BSL172 |
DataExchangeLoading |
Yes | WARNING | There is no check for the attribute DataExchange.Load in the object's event handler | correctness, data-exchange |
BSL173 |
DeletingCollectionItem |
Yes | ERROR | Deleting an item when iterating through collection using the operator "For each ... In ... Do" | correctness, loop |
BSL174 |
DenyIncompleteValues |
Yes | WARNING | Deny incomplete values for dimensions | transaction, error-handling |
BSL175 |
DeprecatedAttributes8312 |
Yes | INFORMATION | Deprecated 8.3.12 platform features. | deprecated, compatibility |
BSL176 |
DeprecatedMethodCall |
Yes | INFORMATION | Deprecated methods should not be used | deprecated |
BSL177 |
DeprecatedMethods8310 |
Yes | INFORMATION | Deprecated client application method. | deprecated, compatibility |
BSL178 |
DeprecatedMethods8317 |
Yes | INFORMATION | Using of deprecated platform 8.3.17 global methods | deprecated, compatibility |
BSL179 |
DeprecatedTypeManagedForm |
Yes | WARNING | Deprecated ManagedForm type | deprecated, ui |
BSL180 |
DisableSafeMode |
Yes | WARNING | Disable safe mode | security |
BSL181 |
DuplicatedInsertionIntoCollection |
Yes | WARNING | Duplicate adding or pasting a value to a collection | correctness, suspicious |
BSL182 |
ExcessiveAutoTestCheck |
Yes | INFORMATION | Excessive AutoTest Check | testing |
BSL183 |
ExecuteExternalCode |
Yes | WARNING | Executing of external code on the server | security |
BSL184 |
ExecuteExternalCodeInCommonModule |
Yes | WARNING | Executing of external code in a common module on the server | security, module |
BSL185 |
ExternalAppStarting |
Yes | WARNING | External applications starting | security |
BSL186 |
ExtraCommas |
Yes | WARNING | Commas without a parameter at the end of a method call | syntax, style |
BSL187 |
FieldsFromJoinsWithoutIsNull |
Yes | WARNING | No NULL checks for fields from joined tables | query, correctness |
BSL188 |
FileSystemAccess |
Yes | WARNING | File system access | security, compatibility |
BSL189 |
ForbiddenMetadataName |
Yes | WARNING | Metadata object has a forbidden name | naming, convention |
BSL190 |
FormDataToValue |
Yes | WARNING | FormDataToValue method call | performance, ui |
BSL191 |
FullOuterJoinQuery |
Yes | WARNING | Using of "FULL OUTER JOIN" in queries | query, design |
BSL192 |
FunctionNameStartsWithGet |
Yes | INFORMATION | Function name shouldn't start with "Получить" | naming, convention |
BSL193 |
FunctionOutParameter |
Yes | WARNING | Out function parameter | design |
BSL194 |
FunctionReturnsSamePrimitive |
Yes | ERROR | The function always returns the same primitive value | redundant, design |
BSL195 |
GetFormMethod |
Yes | WARNING | GetForm method call | deprecated, ui |
BSL196 |
GlobalContextMethodCollision8312 |
Yes | ERROR | Global context method names collision | correctness, compatibility |
BSL197 |
IfElseDuplicatedCodeBlock |
Yes | WARNING | Duplicated code blocks in If...Then...ElseIf... statements | suspicious, duplicate |
BSL198 |
IfElseDuplicatedCondition |
Yes | WARNING | Duplicated conditions in If...Then...ElseIf... statements | suspicious, correctness |
BSL199 |
IfElseIfEndsWithElse |
Yes | INFORMATION | Else...The...ElseIf... statement should end with Else branch | design, robustness |
BSL200 |
IncorrectLineBreak |
Yes | INFORMATION | Incorrect expression line break | style, convention |
BSL201 |
IncorrectUseLikeInQuery |
Yes | WARNING | Incorrect use of 'LIKE' | query, correctness |
BSL202 |
IncorrectUseOfStrTemplate |
Yes | ERROR | Incorrect use of "StrTemplate" | correctness |
BSL203 |
InternetAccess |
Yes | WARNING | Referring to Internet resources | security |
BSL204 |
InvalidCharacterInFile |
Yes | WARNING | Invalid character | correctness, encoding |
BSL205 |
IsInRoleMethod |
Yes | WARNING | IsInRole global method call | security, access-control |
BSL206 |
JoinWithSubQuery |
Yes | WARNING | Join with sub queries | query, performance |
BSL207 |
JoinWithVirtualTable |
Yes | WARNING | Join with virtual table | query, performance |
BSL208 |
LatinAndCyrillicSymbolInWord |
Yes | WARNING | Mixing Latin and Cyrillic characters in one identifier | suspicious, naming |
BSL209 |
LogicalOrInJoinQuerySection |
Yes | WARNING | Logical 'OR' in 'JOIN' query section | query, performance |
BSL210 |
LogicalOrInTheWhereSectionOfQuery |
Yes | WARNING | Using a logical "OR" in the "WHERE" section of a query | query, performance, standard |
BSL211 |
MetadataObjectNameLength |
Yes | WARNING | Metadata object names must not exceed the allowed length | naming, convention |
BSL212 |
MissedRequiredParameter |
Yes | ERROR | Missed a required method parameter | correctness |
BSL213 |
MissingCommonModuleMethod |
Yes | ERROR | Referencing a missing common module method | correctness, module |
BSL214 |
MissingEventSubscriptionHandler |
Yes | ERROR | Event subscription handler missing | correctness, events |
BSL215 |
MissingParameterDescription |
Yes | INFORMATION | Method parameters description are missing | documentation, api |
BSL216 |
MissingSpace |
Yes | INFORMATION | Missing spaces to the left or right of operators + - * / = % < > <> <= >=, keywords, and also to the right of , and ; | style, convention |
BSL217 |
MissingTempStorageDeletion |
Yes | WARNING | Missing temporary storage data deletion after using | resource-management, memory |
BSL218 |
MissingTemporaryFileDeletion |
Yes | WARNING | Missing temporary file deletion after using | resource-management |
BSL219 |
MissingVariablesDescription |
Yes | INFORMATION | All variables declarations must have a description | documentation, convention |
BSL220 |
MultilineStringInQuery |
Yes | INFORMATION | Multi-line literal in query | query, style |
BSL221 |
MultilingualStringHasAllDeclaredLanguages |
Yes | WARNING | There is a localized text for all languages declared in the configuration | localization |
BSL222 |
MultilingualStringUsingWithTemplate |
Yes | INFORMATION | Partially localized text is used in the StrTemplate function | localization, style |
BSL223 |
NestedConstructorsInStructureDeclaration |
Yes | INFORMATION | Nested constructors with parameters in structure declaration | readability, design |
BSL224 |
NestedFunctionInParameters |
Yes | INFORMATION | Initialization of method and constructor parameters by calling nested methods | readability, brain-overload |
BSL225 |
NumberOfValuesInStructureConstructor |
Yes | INFORMATION | Limit on the number of property values passed to the structure constructor | design, readability |
BSL226 |
OSUsersMethod |
Yes | WARNING | Using method OSUsers | security |
BSL227 |
OneStatementPerLine |
Yes | INFORMATION | One statement per line | style, convention |
BSL228 |
OrderOfParams |
Yes | WARNING | Order of Parameters in method | design, convention |
BSL229 |
OrdinaryAppSupport |
Yes | WARNING | Ordinary application support | compatibility, ui |
BSL230 |
PairingBrokenTransaction |
Yes | ERROR | Violation of pairing using methods "BeginTransaction()" & "CommitTransaction()" / "RollbackTransaction()" | transaction, correctness |
BSL231 |
PrivilegedModuleMethodCall |
Yes | WARNING | Accessing privileged module methods | security, access-control |
BSL232 |
ProtectedModule |
Yes | INFORMATION | Protected modules | design |
BSL233 |
PublicMethodsDescription |
Yes | INFORMATION | All public methods must have a description | documentation, api |
BSL234 |
QueryNestedFieldsByDot |
Yes | WARNING | Getting objects nested fields data by dot in database query text | query, performance |
BSL235 |
QueryParseError |
Yes | WARNING | Query text parsing error | query, correctness |
BSL236 |
QueryToMissingMetadata |
Yes | ERROR | Using non-existent metadata in the query | query, correctness |
BSL237 |
RedundantAccessToObject |
Yes | INFORMATION | Redundant access to an object | redundant, performance |
BSL238 |
RefOveruse |
Yes | INFORMATION | Overuse "Reference" in a query | performance, readability |
BSL239 |
ReservedParameterNames |
Yes | WARNING | Reserved parameter names | naming, suspicious |
BSL240 |
RewriteMethodParameter |
Yes | WARNING | Rewrite method parameter | suspicious, correctness |
BSL241 |
SameMetadataObjectAndChildNames |
Yes | ERROR | Same metadata object and child name | naming, design |
BSL242 |
ScheduledJobHandler |
Yes | ERROR | Scheduled job handler | correctness, scheduled-jobs |
BSL243 |
SelfInsertion |
Yes | ERROR | Insert a collection into itself | correctness, suspicious |
BSL244 |
ServerCallsInFormEvents |
Yes | ERROR | Server calls in form events | correctness, ui, performance |
BSL245 |
ServerSideExportFormMethod |
Yes | WARNING | Server-side export form method | correctness, ui |
BSL246 |
SetPermissionsForNewObjects |
Yes | ERROR | The check box «Set permissions for new objects» should only be selected for the FullAccess role | security, access-control |
BSL247 |
SetPrivilegedMode |
Yes | WARNING | Using privileged mode | security |
BSL248 |
SeveralCompilerDirectives |
Yes | ERROR | Erroneous indication of several compilation directives | correctness, directive |
BSL249 |
StyleElementConstructors |
Yes | ERROR | Style element constructor | ui, design |
BSL250 |
TempFilesDir |
Yes | WARNING | TempFilesDir() method call | standard, badpractice |
BSL251 |
TernaryOperatorUsage |
Yes | INFORMATION | Ternary operator usage | style, readability |
BSL252 |
ThisObjectAssign |
Yes | ERROR | ThisObject assign | correctness, suspicious |
BSL253 |
TimeoutsInExternalResources |
Yes | WARNING | Timeouts working with external resources | robustness, performance |
BSL254 |
TransferringParametersBetweenClientAndServer |
Yes | WARNING | Transferring parameters between the client and the server | performance, design |
BSL255 |
TryNumber |
Yes | WARNING | Cast to number of try catch block | error-handling, suspicious |
BSL256 |
Typo |
Yes | INFORMATION | Typo | convention |
BSL257 |
UnaryPlusInConcatenation |
Yes | ERROR | Unary Plus sign in string concatenation | suspicious, brainoverload |
BSL258 |
UnionAll |
Yes | WARNING | Using keyword "UNION" in queries | query, performance |
BSL259 |
UnknownPreprocessorSymbol |
Yes | WARNING | Unknown preprocessor symbol | correctness, directive |
BSL260 |
UnsafeFindByCode |
Yes | WARNING | Unsafe FindByCode() method usage | correctness, robustness |
BSL261 |
UnsafeSafeModeMethodCall |
Yes | WARNING | Unsafe SafeMode method call | security, correctness |
BSL262 |
UsageWriteLogEvent |
Yes | INFORMATION | Incorrect use of the method "WriteLogEvent" | standard, badpractice |
BSL263 |
UseLessForEach |
Yes | WARNING | Useless collection iteration | redundant, suspicious |
BSL264 |
UseSystemInformation |
Yes | WARNING | Use of system information | security |
BSL265 |
UselessTernaryOperator |
Yes | INFORMATION | Useless ternary operator | redundant, readability |
BSL266 |
UsingCancelParameter |
Yes | WARNING | Using parameter "Cancel" | correctness, events |
BSL267 |
UsingExternalCodeTools |
Yes | ERROR | Using external code tools | standard, design |
BSL268 |
UsingFindElementByString |
Yes | WARNING | Using FindByName, FindByCode and FindByNumber | performance |
BSL269 |
UsingLikeInQuery |
Yes | INFORMATION | Using 'LIKE' in query | query, performance |
BSL271 |
UsingObjectNotAvailableUnix |
Yes | WARNING | Using unavailable in Unix objects | compatibility |
BSL272 |
UsingSynchronousCalls |
Yes | WARNING | Using synchronous calls | performance, ui |
BSL273 |
VirtualTableCallWithoutParameters |
Yes | WARNING | Virtual table call without parameters | query, performance |
BSL274 |
WrongDataPathForFormElements |
Yes | ERROR | Form fields do not have a data path | correctness, ui |
BSL275 |
WrongHttpServiceHandler |
Yes | ERROR | Missing handler for http service | correctness, http |
BSL276 |
WrongUseFunctionProceedWithCall |
Yes | ERROR | Wrong use of ProceedWithCall function | correctness, extensions |
BSL277 |
WrongUseOfRollbackTransactionMethod |
Yes | ERROR | Not recommended using of RollbackTransaction method | transaction, error-handling |
BSL278 |
WrongWebServiceHandler |
Yes | ERROR | Wrong handler for web service | correctness, web-service |
BSL279 |
YoLetterUsage |
Yes | INFORMATION | Using Russian character "yo" ("ё") in code | style, convention |