Skip to content

Sbt ScalaMetrics

Release Maven Central CI License

Sbt ScalaMetrics is an Sbt plugin for ScalaMetrics library. It's a convenient way to analyze and generate reports of code metrics for Scala projects. It provides comprehensive analysis at multiple granularity levels: project, package, file, methods/members and generates a detailed single HTML report file with Tailwind CSS styling and interactive d3.js charts and raw JSON and CSV data files. Learn more about ScalaMetrics library by visiting the ScalaMetrics Documentation site.

Features

  • Multi-Level Analysis: Extract metrics at project, package, file, method, and member levels
  • Comprehensive Metrics:
    • Cyclomatic complexity
    • Nesting depth
    • Expression branch density
    • Pattern matching
    • Lines of code
    • Documentation coverage
    • Parameter and arity (implicit, using, default, varargs)
    • Return type explicitness
    • Inline and implicit usage
  • Multi-module Support: Works seamlessly with multi-module SBT projects
  • Multiple Dialect Support: Supports Scala 2.12.x, 2.13.x, and 3.x.x
  • Automatic Dialect Detection: Automatically detects Scala dialects for accurate parsing using a combination of heuristics and statistical methods

Please refer to the Getting Started guide for instructions and quick start examples. You can also explore the Metrics Overview page of ScalaMetrics library to learn more about the various metrics provided by this library.

Contributing

Contributions are welcome! Please read the CONTRIBUTING guide for details on how to contribute.

License

Licensed under the MIT License. See LICENSE file for details.