complexity

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ComplexityOpts = ComplexityOptions{
	Extensions: "",
	Threads:    1,
}

Functions

func PrintTabular

func PrintTabular(results FilesStat, out io.Writer)

func ReadLizardXML

func ReadLizardXML(r io.Reader) (*lizardXML, error)

Types

type ChurnChunk

type ChurnChunk struct {
	File    string `json:"path"`
	Churn   uint   `json:"changes"`
	Added   uint   `json:"additions"`
	Removed uint   `json:"deletions"`
	Commits uint   `json:"commits"`
}

func ReadChurn

func ReadChurn(r io.Reader) ([]*ChurnChunk, error)

type ComplexityOptions

type ComplexityOptions struct {
	Extensions string
	Threads    int
}

type Engine

type Engine = string
var (
	Lizard Engine = "lizard"
)

type FileStat

type FileStat struct {
	Path      string
	Functions FunctionsStat
}

type FilesStat

type FilesStat = []*FileStat

func ParseLizard

func ParseLizard(lizard *lizardXML) (FilesStat, error)

func RunLizardCmd

func RunLizardCmd(repoPath string, opts ComplexityOptions) (FilesStat, error)

type FunctionStat

type FunctionStat struct {
	File      string
	Package   []string
	Name      string
	Line      uint
	Length    uint
	Compexity uint
}

type FunctionsStat

type FunctionsStat = []FunctionStat

Jump to

Keyboard shortcuts

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