Checks that the local variable names conform to a format specified by the format
property.
Local variables are the ones that are visible/accessible only within the block of code in which it appears.
Configuration
{
"type": "LocalVariableName",
"props": {
"severity": "ERROR",
"format": "^[a-z][a-zA-Z0-9]*$"
}
}
The above regex allows camelCase
names.
Invalid
class Test {
public function test() {
var Count:Int = 1;
}
}
Invalid local var signature: "Count" (name should be "~/$^[a-z][a-zA-Z0-9]*$/")