-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule for enforcing use of a common set of Helper Utils #90
Comments
How would you envision detecting spots where these helpers should have been used? Would you look for any place where a How would you let the user define the name of a helper function in the bsconfig? I'm guessing you'd need to carve out specific primitive types in bslint because each type might have slightly different type checking syntax that would require specific logic in bslint to detect. Something like this? bsconfig.json {
"helperFuncs": {
"enabled": true,
"names": {
"boolean": "isBoolean",
"float": "isFloat"
...
}
}
} |
On Roku a lot of projects make use of custom Helper methods to validate and set data. For example:
These are used to enforce safety (prevent Channel crashes), for readability and for less typing of code.
If would be good to define a list of Helper methods for that project, that should be used in place of the Roku native checking. For example:
Use: getCount(NODE) or getCount(AA)
Replaces: NODE.getChildCount() and AA.count() and ARRAY.count()
This rule would also need to define a single file and/or list of exceptions (for Task Node loops etc.) that are exempt from using the Helper Util methods.
The text was updated successfully, but these errors were encountered: