Main Content

Check file names

Check ID: mathworks.jmaab.ar_0001

Guideline: ar_0001: Usable characters for file names

Description

Checks whether filenames adhere to the following guideline standards.

  • Do not begin with a number.

  • Do not begin or end with an underscore.

  • Do not contain consecutive underscores.

  • Do not coincide with reserved MATLAB® words.

  • Contain only alphanumeric characters and underscores.

  • Are not the same as other filenames in the MATLAB path.

Note

  • This check only runs on the directory where the model is located. This behavior does not change when the current directory is changed.

  • This check does not run on the nested sub-directories.

Note

Reserved MATLAB words include the following:

This check applies to the model filename and other file target components in the model directory.

This check requires a Simulink® Check™ license.

Check Parameterization

This check contains sub-checks that correspond to sub IDs specified in the MAB and JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.

For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — a, b, c, d, e, f, g

  • JMAAB — a, b, c, d, e, f, g

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
ar_0001_a: Characters allowed for filenamesOne or more files have invalid names.Use alphanumeric characters and underscores in filenames.
ar_0001_b: Number at the beginningOne or more filenames begin with a number.Use alphabetic characters at the beginning of filenames.
ar_0001_c: Underscore at the beginningOne or more filenames begin with an underscore.Use alphabetic characters at the beginning of filenames.
ar_0001_d: Underscore at the endOne or more filenames end with an underscore.Do not end filenames with underscores.
ar_0001_e: Consecutive underscoresOne or more filenames have consecutive underscores.Do not use consecutive underscores in filenames.
ar_0001_f: Single reserved MATLAB word The filename is a reserved MATLAB word.Do not use reserved MATLAB words as filenames.
ar_0001_g: Identical filenames on pathTwo or more filenames are identical in the MATLAB path.Use unique filenames.

Capabilities and Limitations

  • Use the input parameter Check hidden folders to run the check on hidden folders.

  • Use the input parameter File Extension to check filenames with specific extensions.

  • Does not flag conflicts with C++ keywords.

  • Runs on library models.

  • Does not check auto generated .slmx and rtwmakecfg.m files.