checkMissingSemicolon

Reports lines of code that could result in output to the command window because they are not terminated with a semicolon. Use this check to determine the part of your code that produces unwanted or unexpected output. In the HTML report at most one violation of the same type per line of code will be shown for this check.

Configurable parameters

  • ReportAll (boolean): Set to true to have CC4M report all lines that could result in output to the command window due to not being terminated with a semicolon. For example, this includes calls to the error function. This setting can be used when your coding standards require that all lines of code are terminated with semicolons. When set to false, this check only reports lines that have a MATLAB warning about missing semicolons (lines that will definitely generate output to the command window when executed). By default, this parameter is set to false.

This check has an auto-fixer as well. Clicking the Fix all button in the report fixes all violations for this check, clicking the Fix all in this file button fixes all violations for this check for one file. The Fix on this line button applies the fix on one individual line. For more information, see section Automatic fixes.

Exemption tag: %@ok<MSEMC>