monkeyproof solutions logo
Menu
  • Your challenge
    • Overview

    • Web apps, deployment & integration
    • Refactoring & migration
    • Talent & know-how
    • Efficiency gaps
  • Services
    • Overview

    • Software solutions
    •  ⤷ Scientific coding & optimization
    •  ⤷ Web apps, deployment & integration
    •  ⤷ Software refactoring & migration
    •  ⤷ Cloud adoption & DevOps support
    • Model-based design
    •  ⤷ Modeling & simulation
    •  ⤷ Code generation & integration
    • Talent & know-how
  • Products
    • Overview

    • Simian Web Apps
    • Code Checker for MATLAB
  • About
    • Clients
    • Projects
    • Blog
    • Contact
  1. Products
  2. Code Checker for MATLAB
Benefits Standards & Guidelines Available checks FAQ

CC4M - Code Checker for MATLAB

Steer your MATLAB code development towards production-grade software and reap the rewards of consistent, reliable, easily reviewed, reused, and maintained quality software.

CC4M -  Code Checker for MATLAB

Increase developer productivity

CC4M enhances productivity by automating standards compliance checking, eliminating the tedious aspects of code review. Developers can now concentrate on functionality, while compliance checks during development promote adherence to coding standards.

Improve onboarding, collaboration & code reuse

CC4M ensures consistent code layout, enforces naming conventions, simplifies complexity, and promotes recognizable structures. This fosters quicker onboarding of new team members while enhancing code readability, maintainability, and reusability.

Shorten path to production C/C++ code

Prepare MATLAB code for generation of C/C++ production code, be it using the MathWorks MATLAB Coder or using dSPACEs TargetLink. CC4M reports compatibility issues with respect to used functionality and programming features. Additionally, it flags potential functional disparities between m-code and generated code.

Reduce the cost of defects

CC4M offers checks that enhance testability, enforce code completeness, and manage complexity, making defect detection during test development easier and more efficient. Additionaly, a set of checks prevent possible violations of MISRA Standards when generating C/C++ code. In short, CC4M helps reducing overall defect costs.

Stay at the MATLAB release of choice

CC4M stays up to date with MATLAB releases. In industry projects are often stabilized on a specific MATLAB release. CC4M recognizes this by supporting a range of historic MATLAB releases. Supported MATLAB releases: R2017b - R2024b

Monitor quality with CI/CD & integrations

Next to CC4M availability as a MATLAB Desktop tool, it supports a server/runner based CI/CD and quality dashboarding. GitHub and GitLab integration information avaiable on request. TIOBE TiCS software quality dashboard integrates natively with CC4M.

CC4M | Code and Report 'Variables used'

CC4M | Bulk Checking

CC4M | Report Section on Guideline Configuration

CC4M | Report Sample

CC4M | Configuration Editor

 

Coding Standard and Guidelines for MATLAB - Shipped to Adopt or Adapt

CC4M provides a variety of MATLAB Coding Standards tailored for various purposes, all conveniently accessible online. With an included configuration set, CC4M ensures compliance effortlessly. Whether adopting these standards outright or utilizing them as a foundation for customization, you have the flexibility to align them with your specific needs or pre-existing coding standards.

Coding Standard and Guidelines for MATLAB -  Shipped to Adopt or Adapt

MonkeyProof Coding Standard for MATLAB

Crafted through collaboration with prominent companies employing MATLAB extensively, the MonkeyProof Coding Standard for MATLAB benefits from years of industry expertise. Their invaluable input guides the establishment of essential MATLAB-related coding rules. Notably, the standard is endorsed by TIOBE TiCS and supported by CEO Paul Jansen, who actively engages in the CCB.

Documentation

Compatibility Guidelines for MATLAB Coder

Generating C/C++ code from MATLAB using the MATLAB Coder necessitates adhering to a stricter coding style, utilizing a subset of functions, options, and structures. The prescribed rules not only facilitate the proper utilization of this subset but also identify and caution against potential discrepancies in behavior between MATLAB and the generated code.

Documentation

Compatibility Guidelines for MATLAB Compiler

When deploying algorithms or apps using the MATLAB Compiler (SDK), the MATLAB code must be robust, secure, and following the (MathWorks) documented and undocumented constraints. CC4M comes with a configuration that checks for this.

Documentation

Compatibility Guidelines for TargetLink

Generating C/C++ code from Simulink models using the dSPACE TargetLink, has different contraints on the included MATLAB code, compared to the simuliation requirements. CC4M checks compatibility of all the MATLAB code in a Simulink model with the documented subset of features and functions.

TargetLink site

Introduction to CC4M

MATLAB Code Checks - Categorized & Configurable

CC4M provides a wide array of customizable checks, accompanied by multiple available configurations. Each configuration includes a distinct set of checks, each with its own specified parameter values. Parametric checks can be duplicated within a configuration, allowing for variations in parameters, and each parametrized check can correspond to a coding rule. During the checking processes, CC4M seamlessly utilizes the selected configuration.

MATLAB Code Checks -  Categorized & Configurable

Generic

Verification of generic programming features and constructions not categorized under "functions to avoid" or any other specific category.

Generic Checks Doc

Layout & readability

Checks, some equipped with auto-fixing capabilities, ensuring adherence to preferred comma usage, spacing, line endings, alignment, comments, and more.

Documentation

Compatibility

Ensure compatibility with designated MATLAB releases, identify JAVA usage, and pinpoint features or functions that could pose compatibility concerns, especially during deployment.

Documentation

Naming conventions

CC4M conducts multiple checks on the casing of specific elements in the code, with individual checks for each aspect. This enables customization of parameter values for each casing check.

Documentation

Testability & functionality

Includes checks aimed at enhancing testability and managing code complexity, along with evaluations of function/method prototypes.

Documentation

Security

Security checks, as outlined in the MATLAB Coding Standard, are particularly advised for application development.

Documentation

FAQ

Frequently Asked Questions & Answers.

CC4M primarily supplements M-lint/MATLAB Code Analyzer by detecting additional coding errors that the built-in tools may miss. It also offers extensive customization options for code style and conventions. Like the MATLAB Code Analyzer, CC4M allows exemptions for specific checks, and many checks come with automatic fixes.
Notable advantages of CC4M:

  • Highly Configurable: Most CC4M checks can be customized to fit your coding standards.
  • Version Control Integration: Option to analyze only changed files.
  • Backward Compatibility: New CC4M releases work with older MATLAB versions.
  • Enhanced Code Quality: Includes checks for software security, readability, and layout.
  • Deployment-Ready Configurations: Supports MATLAB Compiler, MATLAB Coder, and TargetLink C/C++ generation.
  • Standards Compliance: Helps meet MISRA and MonkeyProof Coding Standard for MATLAB.
CC4M provides a more flexible and robust approach to MATLAB code analysis, making it a valuable tool for ensuring high-quality, maintainable code.

CC4M can analyze MATLAB code in various formats, including:

  • M-Files (*.m): Scripts, functions, classes, and methods.
  • Simulink Models (*.slx, *.mdl): MATLAB code within Simulink models, MATLAB Function Blocks, and Stateflow Charts.
  • MATLAB Apps (*.mlapp): Code within MATLAB App Designer.
  • MATLAB Live Scripts (*.mlx): Interactive live scripts.

No, your code remains completely private. All analysis and checks are performed locally within the MATLAB session running CC4M.

Yes, you can use CC4M from the command line. Detailed instructions are available in the Command line interface chapter of the CC4M documentation.

Yes, CC4M's command line interface allows integration into unit tests. CC4M can generate:

  • HTML Reports: A detailed analysis of the results.
  • XML Summaries: Useful for automating pass/fail conditions in tests.

This makes CC4M a powerful tool for automated code quality checks in your testing pipeline.

Yes, CC4M is fully compatible with CI/CD pipelines. It is used in pipelines with tools like GitHub, GitLab, and Jenkins. The command line interface is fully documented, making integration seamless for automated workflows.

Yes, you can create a custom set of checks with your desired parameters. The recommended approach is to start by referencing an existing configuration and then add your modifications. A detailed tutorial is available, showing how to create your own configuration and reference the MonkeyProof Coding Standard for MATLAB.

Yes, while CC4M offers highly customizable built-in checks that cover most common use cases, it also supports custom check authoring. Documentation is available upon request, and we’re happy to discuss how your custom checks can be seamlessly integrated into CC4M. Feel free to reach out.

Yes, CC4M offers auto-fixing capabilities. A list of checks that include auto-fix options is available in the Automatic fixes section of the User Guide. This feature helps automate code improvements, saving you time and effort.

CC4M allows you to load a configuration from a shared location, such as a network drive, or load a configuration stored under version control. This makes it easy for your team to use the same configuration.

Yes, CC4M includes a configuration specifically for MISRA AC AGC autocode. While MISRA rules are primarily for C/C++ code, this configuration helps prevent M-code that could lead to MISRA violations when C/C++ code is generated. Note that some MISRA violations can only be addressed through the configuration of the code generator. Please refer to the documentation of your specific code generator for more details.

Yes, you can request a trial via:
  form
  +31 76 8200 314
  info@monkeyproofsolutions.nl

CC4M empowers developers to craft clean, uniform, and guideline-adherent MATLAB code. Seamlessly integrated into the MATLAB editor and Simulink Model Advisor, it rigorously checks MATLAB code, Simulink models, and Stateflow charts for consistency and errors.

CC4M carefully examines your MATLAB code, providing essential insights into functions and variables. It ensures adherence to guidelines, spots function shadowing, and detects missing dependencies. Work efficiently with CC4M, accessing navigation links to locate the precise code location for each failed check.

 

Interested?

Get in touch today, or book your quick-scan or free consult to get the conversation started.

Free consult Quick-scan Contact

© 2025 MonkeyProof Solutions B.V.

  • Terms & conditions
  • Privacy
  • License
We use cookies to personalise content and to analyse our web traffic.
OK
Manage your cookies
Essential site cookies
Google Analytics