Table of Contents
MonkeyProof MATLAB Coding Standard++
- Naming conventions
- Name length
- Loop iterator naming
- Negated boolean names
- Parent / child name redundancy
- Variable casing
- Function casing
- Class casing
- Property casing
- Package casing
- Event casing
- Struct field casing
- Constant casing
- Enumeration member casing
- Name shadowing
- Names to avoid
- Name-value pair casing
- Test suffix
- Name class object
- Layout & comments
- Comment blocks
- Function indentation
- Whitespace in statements
- Whitespace after characters
- Line length
- Indentation length
- Comments on poorly written code
- Equals sign alignment
- Commas in rows
- Line continuation with operators
- Methods/Properties blocks with duplicate attributes
- Whitespace at the end of a line
- Use spaces instead of tab characters.
- Properties blocks before methods blocks
- Statements & expressions
- Constant definitions at top
- Magic numbers
- Function calls without inputs
- One statement per line
- If else
- Switch otherwise
- Mixed types in expressions
- Parentheses in logical expressions
- Parentheses in mathematical expressions
- Assert inputs
- Global variables
- Constant conditional statements
- Group struct field definitions
- Return keyword
- Dependencies known
- Try for exception handling
- Floating-point comparisons
- Cell arrays
- Zero before decimal point
- Abstract class instantiation
- Command syntax
- Higher level rules
- Complexity
- Number of function arguments
- Constructors with single output
- Scripts
- Editor warnings
- Getters and setters
- Mex-files
- Nesting depth
- Reuse of iterator variables
- Nested functions
- Missing methods declarations and implementations
- Mismatch input and output declarations and implementations
- First output constructor
- Iterator variables outside loop
- More input arguments than expected
- Superclass property implementation
- Java dependency
- Method access permissions
- Write interpretable code
- Security