hermanliang / gitinspector

Automatically exported from code.google.com/p/gitinspector
GNU General Public License v3.0
0 stars 0 forks source link

Support for comments/metrics in C# and PowerShell code #59

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Apologies in advance if this is not the appropriate venue for questions...

Does gitinspector work for repositories containing .Net code (specifically C#, 
*.cs files)?
How about Windows PowerShell code (*.ps1, *.psm1)?

Original issue reported on code.google.com by jrnai...@gmail.com on 19 Feb 2015 at 5:03

GoogleCodeExporter commented 9 years ago
You can get them scanned by just supplying -f cs,ps1,psm1. However, comments 
and metrics won't be correctly calculated. For that, all that is needed is a 
simple modification to the following files/modules:

comments.py
metrics.py

Both modules are written to be very general in order to support as many 
languages as possible.

To add support for comments, just modify __comment_begining__, __comment_end__ 
and/or __comment__ in comments.py.

To add support for metrics (ELOC and cyclomatic complexity) you just need to 
modify __metric_eloc__ and __metric_cc_tokens__ in metrics.py.

Patches are welcome :)

/Adam Waldenberg

Original comment by gitinspe...@ejwa.se on 20 Feb 2015 at 4:58