max-lines
Enforce a maximum number of lines in three contexts: function, label and main
INFO
☑️ The predefined configuration "mslint:recommended" enables this rule.
Rule details
This rule limits the number of lines of code in three contexts: function, label and main.
Settings
maximumfunctionthe maximum number of lines of code in functions. Default1000.labelthe maximum number of lines of code in labels. Default1000.mainthe maximum number of lines of code in main. Default1000.
Example of incorrect code for this rule:
maniascript
/*
{
"maximum" = {
"function" = 2,
"label" = 2,
"main" = 2
}
}
*/
Void Function() {
declare Integer A = 1;
declare Integer B = 2;
declare Integer C = 3;
}
***Label***
***
declare Integer A = 1;
declare Integer B = 2;
declare Integer C = 3;
***
main() {
declare Integer A = 1;
declare Integer B = 2;
declare Integer C = 3;
}Example of correct code for this rule:
maniascript
/*
{
"maximum" = {
"function" = 2,
"label" = 2,
"main" = 2
}
}
*/
Void Function() {
declare Integer A = 1;
declare Integer B = 2;
}
***Label***
***
declare Integer A = 1;
declare Integer B = 2;
***
main() {
declare Integer A = 1;
declare Integer B = 2;
}