LC0055 - StefanMaron/BusinessCentral.LinterCop GitHub Wiki
Tok
is meant to be used when the value of the label matches the name
The suffix This rule will check if the value of the label matches with the name of the label without the suffix.
Example
In these examples it will suggest to change the name of GetLbl or GetTxt to GetTok.
GetTok: Label 'GET', Locked = true;
GetLbl: Label 'GET', Locked = true; // The suffix 'Tok' is meant to be used when the value of the label matches the name.
GetTxt: Label 'GET', Locked = true; // The suffix 'Tok' is meant to be used when the value of the label matches the name.
NoSeriesSimulationModeStartedTxt: Label 'No. Series simulation mode started.', Locked = true; // The suffix 'Tok' is meant to be used when the value of the label matches the name.
Locked
To prevent false positives, only when Locked = true
is set on the label the rule will validate the suffix.
In the examples below, the rule will not be raised.
PackagingLbl: Label 'Packaging';
PackagingTxt: Label 'Packaging';