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
or a string 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 strings TODO, FIXME, and NOTE. The search is case insensitive.
Use the Current Folder browser to navigate to the folder containing the files for which you want to produce a TODO/FIXME report.
On the Current Folder browser, click , and then select Reports > TODO/FIXME Report.
The TODO/FIXME Report opens in the MATLAB Web Browser.
In the TODO/FIXME Report window, select one or more of the following to specify the lines that you want the report to include:
The text field check box
You can then enter any text string in this field, including
expression. For example, you can enter
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 strings 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
When you run the TODO/FIXME report on the folder containing
selected and the string
NOTE specified and selected,
the report lists:
|9 and rectangle. (todo)|
|14 Fixme: Is the area of hemisphere as below?|
|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
The report includes lines that have a selected string regardless of
its placement within a comment.
Lines 14 and 17 as a match for the
The report matches selected strings in the file regardless of their
Line 21 as a match for the
The report includes lines that have a string specified in the text
field, assuming that you select the text field.