Type | Scope | Severity | Activated by default |
Minutes to fix |
Tags |
---|---|---|---|---|---|
Code smell |
BSL OS |
Minor |
Yes |
5 |
badpractice brainoverload |
Name | Type | Description | Default value |
---|---|---|---|
authorizedDates |
String |
Allowed dates, comma separated. Example: 00010101,00010101000000,000101010000 |
00010101,00010101000000,000101010000 |
Magic date is any date in your code that does not immediately become apparent without being immersed in context.
Bad
If now < '20151021' Then
HoverBoardIsReal = Undefined;
EndIf;
Good
PredictedDate = '20151021';
If now < PredictedDate Then
HoverBoardIsReal = Undefined;
EndIf;
// BSLLS:MagicDate-off
// BSLLS:MagicDate-on
"MagicDate": {
"authorizedDates": "00010101,00010101000000,000101010000"
}