Rules in this category often point to buggy code. Buggy code is code that is likely not working as intended. For example, referring to the currentUser
in a system process will result in an error during runtime.
Articles
- Attributes should not be re-assigned in create/change object
- Chain of “if/else if” statements should have different conditions
- Check for empty string should be done properly
- Conditions should always include at least one variable
- Day of year should not be used in parse/format date time functions
- Delete behaviour should have error message if blue
- Empty variables should not be used in actions that throw null pointer exception
- Entity events should have either no or exactly one handler
- Entity validation rules should have an error message
- Events should be triggered when doing a commit
- Expressions for “then” and “else” in an “if” statement should be different
- Function arguments should be different
- Hour format should be specified correctly in parse/format date-time functions
- Identical expressions should not be used on both sides of a binary operator
- Lists operations should be passed different arguments
- Lists should not be modified during iteration
- MM and mm tokens should be used correctly in parse/format date-time functions
- Objects should not be dereferenced after failing an empty check
- Only non-empty objects should be dereferenced
- Only variables that are not empty should be returned or assigned
- REST/Web service should have custom error handling
- REST/Web services should have a timeout
- Seconds token should be specified correctly in parse/format date-time functions
- Short-circuit logic should be used correctly to prevent null pointer dereferences in conditionals
- Substring function invocation should make sense
- System.User and System.Session objects should not be created directly
- Variables should not be indirectly compared to empty
- Week year should not be used in date formatting or parsing
- Associations should specify a delete behaviour
- Check for negative conditions in XPath should be done using not instead of !=
- Declared variables should be used
- Imported data should be committed or stored in a variable
- Return expressions for a flow should be different
- Type parameters in a java/script action should be used
- Variable CurrentUser should only be used in a user context
- Variables should not be self-assigned
- Microflow should allow concurrent access
- Module roles should be assigned to a project/user role
- Returned variables should be used
- AM/PM indicator should only be used in combination with lowercase “h”
- Prevent duplicate classes in jars