mh_metric
calculates MATLAB code metrics
TLDR
SYNOPSIS
mh_metric [options] [files or directories]
DESCRIPTION
mh_metric computes code metrics for MATLAB and Octave files and reports violations when metrics exceed acceptable levels. It measures cyclomatic complexity, number of lines, function length, nesting depth, and other code quality indicators.The tool is part of the MISS_HIT suite. If no files or directories are specified, it analyzes the entire working directory and all subdirectories. Configuration can be provided via miss_hit.cfg files in the project tree.
PARAMETERS
FILES
MATLAB files or directories to analyze. If not given, analyzes the entire working directory recursively.--json=FILE
Write metrics report in JSON format to the specified file.--html=FILE
Write metrics report in HTML format to the specified file.--text=FILE
Write metrics report in plain text format to the specified file.--ci
CI mode. Suppresses the overall report and only reports metric violations.--ignore-justifications-with-tickets
Ignore any justifications in code that mention a ticket reference.--help
Display help information.
CAVEATS
Part of the MISSHIT suite, installed via pip (`pip install misshit`). Only analyzes MATLAB (.m) and Octave files. Requires Python 3.6 or later.
HISTORY
mhmetric is part of **MISSHIT (MATLAB Independent, Small & Safe, High Integrity Tools), created by Florian Schanda** for measuring MATLAB and Simulink code quality metrics.
SEE ALSO
mh_lint(1)
