Skip to content

Development Guidelines

Code Style

  • Follow consistent indentation and naming conventions.
  • Use meaningful variable names.
  • Add comments to explain complex logic.

Error Handling

  • Check for null pointers and invalid inputs.
  • Use LOG_ERROR macro to log errors
  • return a CM_Error status code if recoverable...
  • or exit gracefully if not.

Memory Management

  • Allocate memory dynamically where necessary.
  • Free allocated memory to prevent leaks.

Testing

  • Write unit tests for all functions.
  • Use assertions to validate expected behavior.