Skip to content

Common module should have a programming interface (CommonModuleMissingAPI)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Code smell BSL Minor Yes 1 brainoverload
suspicious

Description

A common module must have at least one export method and region "Public" or "Internal".

Examples

Incorrect

// Start module
Procedure Test(A)
    A = A + 1;
EndProcedure
// End module

Correct

// Start module
#Region Internal
Procedure Test(A) Export
    A = A + 1;
EndProcedure
#EndRegion
// End module

Sources

Source: Standard: Module structure (RU)

Snippets

Diagnostic ignorance in code

// BSLLS:CommonModuleMissingAPI-off
// BSLLS:CommonModuleMissingAPI-on

Parameter for config

"CommonModuleMissingAPI": false