STAMPEDE is a static analysis framework for the M programming language. It analyzes M source code and calculates code quality metrics. In addition, it provides a plugin for displaying the results using the Sonar framework.
For screenshots, proposed features, and project progress, please take a look at the STAMPEDE Trello Board.
To view a live demo of this tool, visit http://stampede-cbarthauer.rhcloud.com/. Please note that the live demo is maintained on an as-needed basis. If it isn't working when you need it, please send an email to [email protected].
Additionally, the demo folder contains a fully-functional Sonar distribution with STAMPEDE installed. The demo includes M code from both the [FLAP Fileman Project] (https://github.com/OSEHRA/fileman-22p2) and [OSEHRA's VistA-FOIA] (https://github.com/OSEHRA/VistA-FOIA?source=cr). The following packages from VistA-FOIA are preloaded:
- Accounts Receivable
- Integrated Billing
- Order Entry Results Reporting
- Toolkit
- Uncategorized
Viewing the demo is very easy:
- Unzip demo/sonar-stampede-demo-3.5.1.zip
- On Windows, run bin/windows-x86-64/StartSonar.bat
- In a browser, go to http://localhost:9000
- Duplication Detection - STAMPEDE integrates with Sonar's copy-paste detection system to detect duplication within M source code.
- Lines of Code Metric - STAMPEDE counts physical lines of code.
- Non-Comment Lines of Code Metric - STAMPEDE counts non-comment lines of code. These are lines containing some executable code (i.e., excludes lines containing only a comment).
- Comment Lines Metric - STAMPEDE counts comment lines. These are lines which contain only a comment (and optionally one or more block level indicators).
- Violations - STAMPEDE supports limited detection of syntax errors. Syntax errors are reported using Sonar's violation mechanism.
- Sonar GUI - STAMPEDE displays all results within the Sonar web-based GUI. All metrics are integrated with Sonar's drilldown display to report results at the distribution, module, and file levels.
- STAMPEDE uses ANTLR 4 to parse M code. The ANTLR grammar file is available in the grammar folder: grammar/M.g4. The grammar is incomplete; it only includes enough detail to support the proof-of-concept functionality.
- STAMPEDE is developed according to the VA Java Coding Standard.
STAMPEDE is developed by Chris Barthauer. If you have questions or comments about this project, please send Chris an email at [email protected].