Order of Parameters in method (OrderOfParams)¶
Type | Scope | Severity | Activated by default |
Minutes to fix |
Tags |
---|---|---|---|---|---|
Code smell |
BSL OS |
Major |
Yes |
30 |
standard design |
Description¶
Optional parameters (parameters with default values) should follow mandatory parameters (the ones without default values).
Examples¶
Function CurrencyRateOnDate(Currency, Date = Notdefined) Export
Sources¶
Snippets¶
Diagnostic ignorance in code¶
// BSLLS:OrderOfParams-off
// BSLLS:OrderOfParams-on
Parameter for config¶
"OrderOfParams": false