Main Content

analyzeCodeCompatibility

Create code compatibility analysis results

Description

r = analyzeCodeCompatibility creates code compatibility analysis results for the current working folder and subfolders and returns it as a CodeCompatibilityAnalysis object.

r = analyzeCodeCompatibility(names) analyzes the files or folders specified by names.

r = analyzeCodeCompatibility(___,'IncludeSubfolders',tf) specifies whether to include subfolders in the analysis. By default, subfolders are included in the analysis. Use this syntax with any of the arguments in previous syntaxes.

Examples

collapse all

Create code compatibility analysis results for code in your current folder and subfolders.

r = analyzeCodeCompatibility
r = 

  CodeCompatibilityAnalysis with properties:

               Date: 20-Apr-2017 15:06:06
      MATLABVersion: "R2017b"
              Files: [92×1 string]
    ChecksPerformed: [299×6 table]
    Recommendations: [28×7 table]

Analyze the code again and omit subfolders from the analysis.

r = analyzeCodeCompatibility('IncludeSubfolders',false)
r = 

  CodeCompatibilityAnalysis with properties:

               Date: 20-Apr-2017 15:06:56
      MATLABVersion: "R2017b"
              Files: [5×1 string]
    ChecksPerformed: [299×6 table]
    Recommendations: [1×7 table]

Input Arguments

collapse all

Name of files or folders to analyze, specified as a character vector, cell array of character vectors, string scalar, or string array.

The name of a file must be a valid MATLAB® code or App file (.m, .mlx, or .mlapp).

Example: '../thisFile.m'

Example: {'folderA','folderB','fileA'}

Data Types: char | string

Subfolder analysis indicator, specified as true, false, 0, or 1. By default, analyzeCodeCompatibility includes subfolders in the analysis. To omit subfolders, set tf to false or 0.

Version History

Introduced in R2017b