Mumpster
http://www.mumpster.org/

Any Tools for code metrics, quality or lbeautification?
http://www.mumpster.org/viewtopic.php?f=16&t=1716
Page 1 of 1

Author:  gbmav [ Mon Aug 20, 2012 5:03 am ]
Post subject:  Any Tools for code metrics, quality or lbeautification?

Hi

Are there any tools for checking code quality?
e.g. a way to parse MUMPS and use sonar tool (open source project)
or any other code quality tool

Or do the basics eg count lines of code and comments (e.g. CLOC)

Or do additional layout and style checks, and good programming checks
e.g. as per Lint for 'C'

And reverse engineering
ie creation of documentation - both textual and graphical (eg call trees)
as per javadoc, doxygen for Java
cflow for "C" to show a simple call tree

Ideally code to self document globals would be useful, is there a way to self document/explain the indexes in a global?

Or code beautification tools, to relayout code in a neat and consistent format.

Cheers

Author:  whitten [ Fri Mar 01, 2013 10:10 am ]
Post subject:  Re: Any Tools for code metrics, quality or lbeautification?

I had never heard of Sonar as a code coverage tool. I looked it up, and apparently it is a tool that compares test cases with the code that it is being tested. This runs into the issue that very few people wrote test cases for MUMPS code in the past due to lack of space and resources. This could be changed, but until it is changed, sonar would not be a very useful tool.

I've never heard of CLOC, but have heard of SLOC (source lines of code). Generally the terse nature of MUMPS code means that counts of lines of code are pretty much meaningless when compared to other programming languages. The XINDEX program gives the number of bytes of code in a routine, but not the number of lines in a routine.

Some people consider XINDEX as something like a lint for MUMPS code. It is rather crude, and doesn't do live-code analysis, or def-use chains for variables, but it does give some warnings and errors on a routine.

There is a package from George James software called RE/M which does some reverse-engineering analysis of MUMPS code. It is something you have to purchase, the webpage http://www.georgejames.com/rem
may give you some useful info about it.

Documentation re MUMPS routines in VistA can be stored in the ROUTINE File (#9.8) but very few people do that. It is also possible to comment the routine itself using semicolons (";")

Best Wishes,
David

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/