reportDependencies

The file may use functions not defined in the file itself. These dependencies and additional information, are listed under reportDependencies.

For every valid dependency, the following is given:

  • The name of the dependency

  • The call itself and a link to the line on which the function is called

  • The type of function if known (Local, nested etc.)

  • The file on which the current file depends

  • The function that uses the dependency (Caller)

An example of two dependencies as reported by CC4M is given in figure Two examples of reported dependencies.

Two examples of reported dependencies

Two examples of reported dependencies

Unknown dependencies can be recognized by the Function source column. A dependency is considered unknown if:

  • The function does not exist.

  • The function is not on the path during the CC4M run. As described in section General, the code selected for checking is temporarily added to the path.

  • It is a function handle, or created/used in an eval-like construction.

  • It is a dynamic reference to a package function or method.

Limitations

  • Accessing undeclared variables or variables loaded with the load function without outputs could lead to unknown dependencies being reported.

  • If a dependency is used as a variable within the same scope, the dependency is not reported. This also holds when the dependency is used as a function before the variable is declared.

Configurable parameters

  • DoReportBuiltinDependency (boolean): If set to true, MATLAB-installed functions must be shown in the dependency report. The default value for this parameter is true.

  • DependenciesUniqueGlobal (boolean): If set to true, uniqueness of dependencies is global shown over all checked file, only relevant if multiptle files checked. If set to false, uniqueness of dependencies is per file. The default value for this parameter is true.

  • DependenciesUniquePerFunction (boolean): If set to true, uniqueness of dependencies is shown per function, only relevant if single file checked. If set to false, uniqueness of dependencies is shown per file. The default value for this parameter is true.

Exemption tag: %@ok<RDEPE>