BSL271 — Using unavailable in Unix objects¶
Summary¶
Using unavailable in Unix objects
Identifiers¶
| Field | Value |
|---|---|
| Rule code | BSL271 |
| Compatible alias | UsingObjectNotAvailableUnix |
| Severity | WARNING |
| Enabled by default | Yes |
| Implemented | Yes |
| Tags | compatibility |
Behavior¶
- The public identifier
BSL271and aliasUsingObjectNotAvailableUnixare 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.
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:
bsl-disable:
- compatible
BSLLSform:
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: BSL271
// code without this diagnostic
// noqa-enable: BSL271
// bsl-disable: BSL271
// code without this diagnostic
// bsl-enable: BSL271
// BSLLS:UsingObjectNotAvailableUnix-off
// code without this diagnostic
// BSLLS:UsingObjectNotAvailableUnix-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¶
On Linux OS COM, OLE, ActiveDocument are not available. For integration use other options, for example XML file exchange or web-services. For COM AddIns, it is recommended to change them to NativeAPI AddIn.
Checked the use of unavailable in:
COMObjectMail
Checking the value of the condition is not satisfied.
Addition¶
When found unavailable in Linux objects, the method is checked to include condition flow for platform type:
Linux_x86WindowsMacOs
Examples¶
or
Instead of this you can useStartApplication().
SystemInformation = New SystemInformation();
If Not SystemInformation.PlatformType = PlatformType.Linux_x86 OR PlatformType.Linux_x86_64 Then
Mail = New Mail;
EndIf;