effrit

command module
v0.0.0-...-d0e143f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2025 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Ifrit

Effrit

Build Status

Go Efferent and Afferent package metric calculator.

Metrics calculated currently by this package:

  • Instability metric
  • Abstractness metric
  • Distance from main sequence metric

All metrics are now supported and calculated accordingly.

Description of these metrics

https://en.wikipedia.org/wiki/Software_package_metrics

Please see Robert Cecil Martin's Clean Architecture book on details describing those metrics.

In terms of what this tool is doing, please refer to this post: Efferent and Afferent Metrics in Go.

Usage on Effrit

Here is an example of running this tool on this very project:

screenshot

Package Data

Effrit now dumps data as JSON file into the project root directly. Until I finish the CGUI for effrit, this data can be processed by any other tool. Example using Effrit project:

{
   "packages":[
      {
         "Name":"effrit",
         "FullName":"github.com/offensiverep/effrit",
         "Imports":[
            "github.com/offensiverep/effrit/cmd"
         ],
         "ImportCount":1,
         "DependedOnByCount":0,
         "DependedOnByNames":null,
         "Stability":1,
         "Abstractness":0,
         "DistanceFromMedian":0,
         "Dir":"/Users/hannibal/goprojects/effrit",
         "GoFiles":[
            "main.go"
         ]
      },
      {
         "Name":"cmd",
         "FullName":"github.com/offensiverep/effrit/cmd",
         "Imports":[
            "github.com/offensiverep/effrit/pkg"
         ],
         "ImportCount":1,
         "DependedOnByCount":1,
         "DependedOnByNames":[
            "github.com/offensiverep/effrit"
         ],
         "Stability":0.5,
         "Abstractness":0.5,
         "DistanceFromMedian":0,
         "Dir":"/Users/hannibal/goprojects/effrit/cmd",
         "GoFiles":[
            "root.go",
            "scan.go"
         ]
      },
      {
         "Name":"pkg",
         "FullName":"github.com/offensiverep/effrit/pkg",
         "Imports":[

         ],
         "ImportCount":0,
         "DependedOnByCount":1,
         "DependedOnByNames":[
            "github.com/offensiverep/effrit/cmd"
         ],
         "Stability":0,
         "Abstractness":0.3,
         "DistanceFromMedian":0.7,
         "Dir":"/Users/hannibal/goprojects/effrit/pkg",
         "GoFiles":[
            "packages.go",
            "scan.go"
         ]
      }
   ]
}

Contributions

Are always welcomed!

Documentation

Overview

@package_owner = @skarlso

Directories

Path Synopsis
cmd
@package_owner = @skarlso
@package_owner = @skarlso
pkg
Package pkg has the main brains of Effrit.
Package pkg has the main brains of Effrit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL