Suggested Improvements
Default severity: Info Auto-fix: No Category: Suggested Improvements Can be disabled: Yes Enabled by default: No (opt in per rule or per category)
What this rule does
A data-driven rule module that handles 243 MATLAB Code Analyzer checks about functions and patterns that are not recommended, pairing each with a modern replacement suggestion. Instead of implementing one struct per check, a single SuggestedImprovementsEngine loads data/suggested_improvements.toml at compile time, parses it into a function-name lookup table, and emits diagnostics with the specific check ID from the matched entry (e.g. CSVRD, not the meta ID SUGGESTED_IMPROVEMENTS).
On each function_call or command node the engine extracts the function name and performs an O(1) HashMap lookup, reporting the first matching entry for that name (some names map to several check IDs, e.g. maketform → MTFA1, MTFA2, MTFP1, MTFP2, MTFB). Entries with an empty function_name are "generic" checks that cannot be matched by name alone (they require AST pattern matching) and are skipped during the lookup-based check.
Check IDs
Suggested Improvements (243 checks)
Examples
Incorrect
data = csvread('data.csv'); % CSVRD — use readmatrix instead
if isdir(folder) % ISDIR — use isfolder instead
disp('folder exists');
endCorrect
data = readmatrix('data.csv');
if isfolder(folder)
disp('folder exists');
endConfiguration
[lint.categories]
suggested-improvements = "info"
[lint.rules]
SUGGESTED_IMPROVEMENTS = "off"See Configuration for the full parameter list and rules.md for the complete rule inventory.