Main Content

matlab.codeanalyzer Settings

Code analyzer settings

Since R2020a

You can change how Code Analyzer messages appear in the Editor using the matlab.codeanalyzer settings. With a few exceptions, these settings apply to messages in the Editor, Live Editor the MATLAB® Function Block Editor (if your products use that tool), and the Code Analyzer Report. Access matlab.codeanalyzer settings using the root SettingsGroup object returned by the settings function. For example, set the temporary value for the underline option to 1 to only underline errors. By default, the underline options is set to 2, underlining both errors and warnings.

s = settings;
s.matlab.codeanalyzer.UnderlineOption.TemporaryValue = 1

For more information about settings, see Access and Modify Settings.

matlab.codeanalyzer

Enable continuous code checking, specified as 1 or 0.

Set to 1 to enable continuous code checking in the Editor and Live Editor.

Example: s.matlab.codeanalyzer.EnableIntegratedMessages.TemporaryValue = 0

Type of issues to underline, specified as one of the values in the table below. Regardless of the underlining option that you choose, the Editor and Live Editor mark errors and warnings in the message indicator bar.

ValueDescription
0No underline.
1Underline errors only.
2Underline errors and warnings.

Example: s.matlab.codeanalyzer.UnderlineOption.TemporaryValue = 1

Active message settings file name, specified as a string scalar or character vector. The name of the file must include the full path to the file. By default, the value of this setting is unset and MATLAB uses the default Code Analyzer message settings.

Example: s.matlab.codeanalyzer.ActiveConfigurationFile.TemporaryValue = "C:\MyWork\MATLAB\MyMessageSettings.txt"

Version History

Introduced in R2020a