RSM operates from a shell command or as a Visual Studio Tool. You pass various arguments to RSM and file names via shell wild cards, a file list or recursive descent of a directory. The following is a summary of the RSM options and parameters. For complete detail on all the RSM options review the Reports and Options manual pages.
RSM Operation and Syntax is summarized in the help file. This file can be generated by specifying the -h option and rerouting the file to a file, rsm -H -hf > rsm_help.htm
Program
Operation
Source files may be processed via wild cards, recursively down a file tree or
from a specified list of files or directories. The evaluation copy of this program
will only process 20 files at one execution. Files are normally processed in
the order they are discovered by the input mode. The option -Rn will sort the
input list alphabetically for sorted processing. The -F option processes a specific
list of files or directories.
RSM operates through a series of switches and options. RSM processes files via
several input modes and creates reports via several output modes. This user
manual details the input modes, output formats, modes and runtime
switches.
Modes of Operation
RSM emits it's output to standard out, which is normally to the screen or terminal, unless it is redirected to a file. This technology allows the user to capture various forms of file outputs. RSM can create CSV, HTML, XML and Text output.
RSM can create reports via the following method. The default output method is to the screen or stdout. Users can redirect this output to a file as shown in the previous example or use the direct file method for creating report files.
Operation Step by Step
RSM is designed to operate according to the following process. Each step of the process is covered in detail in this manual.
Step 1: Determine the output format, -H -A or no switch
for text. "no option" ASCII UNIX Text Format
-A CSV format for spreadsheet import
-H HTML format with hyperlinks
Step 2: Determine the output file relative to the format.
-O"report.htm" -H WWW Browser Report
-O"report.csv" -A Spreadsheet Report
-O"report.txt" Text Report
An option to using the -O option is the use of the shell redirection to a file. This is useful if a DOS text file is desired versus the RSM -O UNIX text format. rsm -s *.cpp > report.txt
Step 3: Specify the report type using the various report switches individually or by aggregation. -fa -c -o Functions, Complexity, Objects -Es -Ec Extract strings and comments -hs Help Syntax
Step 4: Specify the file input mode using file names,
wild cards, file lists or recursive descent.
.\inc\anyfile.h Ordinary file names.
*.h *.cpp Wild cards, command line expansion
-F"somefilelist.txt" File list of names and directories
-r"h,c,cpp,java ." Recursive descent where . specifies -r h,cpp,java /project the current working
directory.
Step 5: Creating the RSM command line. Try the Windows wizard it create RSM command lines.
rsm anyfile.h anyfile.cpp
rsm -O"analysis.txt" -n c:\proj\*.h c:\proj\*.cpp
rsm -O"metrics.txt" -Ta -Tl -TN -F"project1_list.txt"
rsm -H -O"metrics.htm" -fa -c -o -r"h,cpp,java ."
rsm -A -O"metricsdiff.csv" -w"x baseline1.dat, baseline2.dat"