CC4M - Code Checker for MATLAB
Current version: v2.14.0
Supported MATLAB releases: R2017b - R2024a
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.
CC4M - Business benefits.
Steer your MATLAB code development towards production-grade software and reap the rewards of consistent, reliable, easily reviewed, reused, and maintained quality software.
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 embedded code
Besides MATLAB's editor hints and the Coder Readiness tool, CC4M supplements with extra analysis to enhance code readiness for generation. 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, thereby reducing overall defect costs.
Introduction to CC4M
MATLAB Coding Standards. 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.
MATLAB Coding Standard
Crafted through collaboration with prominent companies employing MATLAB extensively, the MATLAB Coding Standard 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.
MATLAB Coding Standard ++
At MonkeyProof Solutions, we employ a specialized extension of the MATLAB Coding Standard, integrating our corporate naming conventions for variables, structure field names, functions, and classes. This ensures cohesion between industry best practices and your organization's requirements, enhancing code clarity and maintainability.
MATLAB Coder Compatibility Standard
Generating C/C++ code from MATLAB 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.
MATLAB Compiler Compatibility Standard
These rules detect both (MathWorks) documented and undocumented limitations when code is distributed via the MATLAB Compiler. Additionally, they verify for insecure file and web access.
CC4M 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.
Generic
Verification of generic programming features and constructions not categorized under "functions to avoid" or any other specific category.
Layour & readability
Checks, some equipped with auto-fixing capabilities, ensuring adherence to preferred comma usage, spacing, line endings, alignment, comments, and more.
Compatibility
Ensure compatibility with designated MATLAB releases, identify JAVA usage, and pinpoint features or functions that could pose compatibility concerns, especially during deployment.
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.
Testability & functionality
Includes checks aimed at enhancing testability and managing code complexity, along with evaluations of function/method prototypes.
Security
Security checks, as outlined in the MATLAB Coding Standard, are particularly advised for application development.