This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Add Reminders to Files

Annotating a file makes it easier to find areas of your code that you intend to improve, complete, or update later.

To annotate a file, add comments with the text TODO, FIXME, or any text of your choosing.

After you annotate several files, run the TODO/FIXME Report, to identify all the MATLAB® code files within a given folder that you have annotated.

This sample TODO/FIXME Report shows a file containing the text TODO, FIXME, and NOTE. The search is case insensitive.

    Note:   MATLAB does not support creating TODO/FIXME reports for live scripts. When creating a report for all files in a folder, all live scripts in the selected folder are excluded from the report.

Working with TODO/FIXME Reports

  1. Use the Current Folder browser to navigate to the folder containing the files for which you want to produce a TODO/FIXME report.

      Note:   You cannot run reports when the path is a UNC (Universal Naming Convention) path; that is, a path that starts with \\. Instead, use an actual hard drive on your system, or a mapped network drive.

  2. On the Current Folder browser, click , and then select Reports > TODO/FIXME Report.

    The TODO/FIXME Report opens in the MATLAB Web Browser.

  3. In the TODO/FIXME Report window, select one or more of the following to specify the lines that you want the report to include:

    • TODO

    • FIXME

    • The text field check box

      You can then enter any text in this field, including a regular expression. For example, you can enter NOTE, tbd, or re.*check.

  4. Run the report on the files in the current folder, by clicking Rerun This Report.

    The window refreshes and lists all lines in the MATLAB files within the specified folder that contain the text you selected in step 1. Matches are not case sensitive.

    If you want to run the report on a folder other than the one currently specified in the report window, change the current folder. Then, click Run Report on Current Folder.

To open a file in the Editor at a specific line, click the line number in the report. Then you can change the file, as needed.

Suppose you have a file, area.m, in the current folder. The code for area.m appears in the image that follows.

When you run the TODO/FIXME report on the folder containing area.m, with the text TODO and FIXME selected and the text NOTE specified and selected, the report lists:

9 and rectangle. (todo)
14 Fixme: Is the area of hemisphere as below?
17 fIXME
21 NOTE: Find out from the manager if we need to include

Notice the report includes the following:

  • Line 9 as a match for the text TODO. The report includes lines that have the selected text regardless of its placement within a comment.

  • Lines 14 and 17 as a match for the text FIXME. The report matches selected text in the file regardless of their casing.

  • Line 21 as a match for the text NOTE. The report includes lines that have text as specified in the text field, assuming that you select the text field.

Was this topic helpful?