Report:  Recursive Descent Input Mode
Option:  -r
Required Parameters:  -r <file extension list> <starting directory for recursive descent>
Compatible Options:  A, a, b, c, e, f, H, i, k, l, m, n, O, o, s, R, T, v, w, W
Usage:
rsm -H -r h,c,cpp c:\work\reports > report.htm
rsm -H -r java c:\work\reports > report.htm
Source:  C, C++ and Java
The -r input mode recursively descend the specified directory looking for file which have the specified extensions.  The mode can easily acquire all the source files for a large project.  The option requires two additional parameters in successive order.  -r must be the last option used in the list of RSM options.   -r is always followed by a comma delimited list of source code file extensions and the starting directory.  For example:  You wish to start at c:\project and process the metrics on all header, C++ source and Java source files.  You also wish to process the metrics for functions, object classes and complexity.  The following RSM command can be used to accomplish this:

rsm -f -o -c -r h,cpp,java c:\project > project_metrics.txt

There are recursive descent modifiers that can used to alter the behavior of the recursive descent.  -RN tells the recursive algorithm to not sort the directory/filenames alphabetically.  This can greatly increase the speed of recursive descent.  It also report the file names as they occur in the directory tree.   -RL creates a list of the filenames to be processed by the recursive descent but doe not actually perform any metrics parsing.  This mode can be used to see which files would have been processed.

  File: C:\work\reports\seahunt_reports\ocean.cpp
  Date: Thu Jun 24 20:30:52 1999                      File Size: 837 Bytes
  LOC 34       eLOC 24       lLOC 13       Comment 10       Lines       56

  File: C:\work\reports\seahunt_reports\ocean.h
  Date: Thu Jun 24 20:30:48 1999                      File Size: 574 Bytes
  LOC 22       eLOC 20       lLOC 11       Comment 5        Lines       34

  File: C:\work\reports\seahunt_reports\target.cpp
  Date: Thu Jun 24 21:07:00 1999                     File Size: 1323 Bytes
  LOC 83       eLOC 57       lLOC 27       Comment 3        Lines       99

  File: C:\work\reports\seahunt_reports\target.h
  Date: Thu Jun 24 21:00:02 1999                      File Size: 683 Bytes
  LOC 27       eLOC 23       lLOC 12       Comment 8        Lines       43