Home

Awesome

SpringLint

SpringLint is a simple tool that performs code metrics and code smells analysis in your Spring MVC systems. The tool is based on Maurício Aniche's PhD thesis.

Usage

java -jar springlint
 -o,--output <arg>    Path to the directory output.
 -otype <arg>         Type of the output: 'csv', 'html'
 -p,--project <arg>   Path to the project

Or if you like Maven:

mvn com.github.mauricioaniche:springlint-maven-plugin:0.5:springlint

Then, just check the generated html.

Interpreting the code metrics

Springlint compares your classes to a benchmark of thousands of classes from 120 Spring MVC systems. The tool produces a treemap. Red dark squares mean your class is within the 10% worst classes (classes with highest values) in the benchmark. Light red squares (10-20%), yellow (20-30%), green (30%-100%) are the other categories. Also, the size of the square is proportional to the metric value: the bigger the square the higher the metric value. In practice, you should be worried about red classes.

Different from other tools, SpringLint uses different thresholds for each architectural role, e.g., if a class is a Controller, it uses [26,29,34] as thresholds for coupling, while it uses [16,20,25] for coupling in Entities.

We use the following metrics from the CK suite:

Interpreting the code smells

Springlint also detects different code smells in Spring MVC systems.
Currently, we support 6 smells:

Our studies show that classes affected by these smells are more prone to change and to defects. So, you need to avoid them.

Related Work

Author

Maurício Aniche (m.f.aniche at tudelft dot nl, @mauricioaniche)

Collaborators (in no order):

License

This software is licensed under the Apache 2.0 License.