In this repo, we provide information on how to replicate our MSR 2017 study which examined the code quality of open-source reposiotires on GitHub by using static code analysis.
For our static analyses, we use ConQAT, a free and open-source analysis tool developed by the folks at CQSE GmbH.
We analyzed repositories in C, C++, C#, Java, and JavaScript and configured ConQAT to calculate the following metrics:
Metric | Setting |
---|---|
Clone Coverage | min. clone length : 10, max-instances : 50 |
Nesting Depth | Nesting <= 5: 'green', else 'red' |
Method Length | method <= 75 SLOC: 'green', else 'red' |
File Size | file <= 750 SLOC: 'green', else 'red' |
Comment Incompl. | #commented interfaces / #expected interface comments[1] |
[1] To retrieve the expected interface comments, we used the following ConQAT comment selectors:
- For C and C++ :
public & (type | method | property | attribute ) & !(simpleGetter | simpleSetter | annotated(Override) | override)
- For Java and C# :
type|(public&(attribute|(method&declaration)))
This repo contains resources for excluding test, generated and third-party code during static code analyses.