1. MonkeyProof MATLAB Coding Standard++
  2. Table of Contents
  3. Introduction
  4. 1. Naming conventions
    ❱
    1. 1.1. Name length
    2. 1.2. Loop iterator naming
    3. 1.3. Negated boolean names
    4. 1.4. Parent / child name redundancy
    5. 1.5. Variable casing
    6. 1.6. Function casing
    7. 1.7. Class casing
    8. 1.8. Property casing
    9. 1.9. Package casing
    10. 1.10. Event casing
    11. 1.11. Struct field casing
    12. 1.12. Constant casing
    13. 1.13. Enumeration member casing
    14. 1.14. Name shadowing
    15. 1.15. Names to avoid
    16. 1.16. Name-value pair casing
    17. 1.17. Test suffix
    18. 1.18. Name class object
  5. 2. Layout & comments
    ❱
    1. 2.1. Comment blocks
    2. 2.2. Function indentation
    3. 2.3. Whitespace in statements
    4. 2.4. Whitespace after characters
    5. 2.5. Line length
    6. 2.6. Indentation length
    7. 2.7. Comments on poorly written code
    8. 2.8. Equals sign alignment
    9. 2.9. Commas in rows
    10. 2.10. Line continuation with operators
    11. 2.11. Methods/Properties blocks with duplicate attributes
    12. 2.12. Whitespace at the end of a line
    13. 2.13. Use spaces instead of tab characters.
    14. 2.14. Properties blocks before methods blocks
  6. 3. Statements & expressions
    ❱
    1. 3.1. Constant definitions at top
    2. 3.2. Magic numbers
    3. 3.3. Function calls without inputs
    4. 3.4. One statement per line
    5. 3.5. If else
    6. 3.6. Switch otherwise
    7. 3.7. Mixed types in expressions
    8. 3.8. Parentheses in logical expressions
    9. 3.9. Parentheses in mathematical expressions
    10. 3.10. Assert inputs
    11. 3.11. Global variables
    12. 3.12. Constant conditional statements
    13. 3.13. Group struct field definitions
    14. 3.14. Return keyword
    15. 3.15. Dependencies known
    16. 3.16. Try for exception handling
    17. 3.17. Floating-point comparisons
    18. 3.18. Cell arrays
    19. 3.19. Zero before decimal point
    20. 3.20. Abstract class instantiation
    21. 3.21. Command syntax
  7. 4. Higher level rules
    ❱
    1. 4.1. Complexity
    2. 4.2. Number of function arguments
    3. 4.3. Constructors with single output
    4. 4.4. Scripts
    5. 4.5. Editor warnings
    6. 4.6. Getters and setters
    7. 4.7. Mex-files
    8. 4.8. Nesting depth
    9. 4.9. Reuse of iterator variables
    10. 4.10. Nested functions
    11. 4.11. Missing methods declarations and implementations
    12. 4.12. Mismatch input and output declarations and implementations
    13. 4.13. First output constructor
    14. 4.14. Iterator variables outside loop
    15. 4.15. More input arguments than expected
    16. 4.16. Superclass property implementation
    17. 4.17. Java dependency
    18. 4.18. Method access permissions
    19. 4.19. Write interpretable code
  8. 5. Security
    ❱
    1. 5.1. Eval-functions
    2. 5.2. Shell escape
    3. 5.3. Security weboptions
    4. 5.4. Security XML reading
    5. 5.5. Constant variable names
    6. 5.6. Security Username and Password

MonkeyProof MATLAB Coding Standard++ v1.3.2

MonkeyProof MATLAB Coding Standard++

Version 1.3

cc4m_logo

© 2023 MonkeyProof Solutions BV

info@monkeyproofsolutions.nl

www.monkeyproofsolutions.nl

T: +31 (0)76 8200 314