Keys for Sorting

Keys for Sorting

 
Report:  Key Sort Method for Function, Class and Namespace/Package  Reports
Option:  -k
Option Parameters:
-kd  Sort descending (default ascending)
-k0  No list sort (default- fastest operation)
-k1  Sort by Name
-k2  Sort by LOC
-k3  Sort by eLOC
-k4  Sort by lLOC
-k5  Sort by Cyclomatic Complexity
-k6  Sort by Work File Difference State
-k7  -Td report sorted by funciton count
-k8  -Td report sorted by quality notice count
-k9  -Td report sorted by file date
-k10 -Td report sorted by file size
Compatible Options: RSM Option Cross Reference
Usage:
rsm -H -O"report.htm" -fa -o -c -k5 *.h *.cpp
rsm -H -O"report.htm" -fa -o -c -K5 *.java
Source:  C, C++, C# and Java
Function, Class, Package or Namespace project summaries can be sorted by the above methods.  The default method is no sort key.  A common sort method is to use k5 where the report summaries are sorted by cyclomatic complexity.  This report makes it easy to identify the most complex entities in the system.  Sorting by LOC makes it easy to identify the largest modules in the system.