Ticket #245 (assigned enhancement)

Opened 8 years ago

Last modified 8 years ago

Provide framework and implementation for some code metrics

Reported by: hopscc Owned by: Chuck
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:


Provide access to some simple code metrics (LinesOfCode and simple
McCabe/Cyclomatic Complexity calculation) done by Cobra compiler driven from compiler commandline option.

Implement such that there is a reasonably accessible framework for adding additional metric calculations in the future.

See  Forum Discussion Utility of cobra compiler generating code metrics


metrics.patch Download (51.9 KB) - added by hopscc 8 years ago.

Change History

Changed 8 years ago by hopscc

Changed 8 years ago by hopscc

  • owner changed from hopscc to Chuck
  • status changed from new to assigned

patch for enhancement supporting metrics.
Rel note and new tests

It should be relatively easy to add additional metrics calcs by augmenting MetricsGenerator for the calculation and CommandLine.cobra for a new metrics

Note that this patch includes the code/patch from ticket:225 (multivalue cmdline options) as the metrics cmdline option uses/needs it.

In addition to the -metrics cmdline option theres a new '-parse' or '-p' or '-syntax' option that only runs the cobra frontend ( suppresses native code gen and native code compilation).
This is intended to be analogous to -c -compile and -r -run

Without this metrics will be calculated/generated as a side effect to compilation

cobra -metrics <filelist>

With it only metrics calculations (or any front end processing) can be done without the delay/overhead due to compilation (if all you want is the metrics info)

cobra -parse -metrics <filelist>

Additionally you can use it for a (front end only) syntax check run on your code....

cobra -syntax ACobraFile.cobra

Changed 8 years ago by Chuck


Note: See TracTickets for help on using tickets.