Skip to content

nexus_checkcode_safety

matlab_compat · scripts/matlab_compat/nexus_checkcode_safety.m

: msgs = nexus_checkcode_safety (code_lines)

MISRA-M equivalent safety checks for checkcode (nexus#2299 / safe2-001).

Rules (MATLAB safety-certification tooling, pure-MATLAB):

  • C2001 — no eval / evalc / evalin
  • C2002 — no dynamic field names (obj.(expr))
  • C2003 — no global

code_lines must already have comments and string literals stripped (as produced by nexus_checkcode_strip_comments). Each message is a checkcode struct: message, fix, line, column, id.