ratio

package
v0.54.6 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffRatio added in v0.20.0

type DiffRatio struct {
	A      float64 `json:"a"`
	B      float64 `json:"b"`
	Diff   float64 `json:"diff"`
	RatioA *Ratio  `json:"-"`
	RatioB *Ratio  `json:"-"`
}

type File added in v0.31.0

type File struct {
	Code     int    `json:"code"`
	Comments int    `json:"comment"`
	Blanks   int    `json:"blank"`
	Path     string `json:"path"`
	Lang     string `json:"language"`
}

type Files added in v0.31.0

type Files []*File

type Ratio

type Ratio struct {
	Code      int   `json:"code"`
	Test      int   `json:"test"`
	CodeFiles Files `json:"code_files"`
	TestFiles Files `json:"test_files"`
}

func Measure

func Measure(root string, code, test []string) (*Ratio, error)

func New

func New() *Ratio

func (*Ratio) Compare added in v0.20.0

func (r *Ratio) Compare(r2 *Ratio) *DiffRatio

func (*Ratio) DeleteFiles added in v0.31.0

func (r *Ratio) DeleteFiles()

func (*Ratio) Merge added in v0.31.0

func (r *Ratio) Merge(r2 *Ratio) error

Jump to

Keyboard shortcuts

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