code

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BAD = 50.0
View Source
const MEDIUM = 75.0

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyser

type Analyser struct {
	Module           GoMod
	GoVersion        string //will have the OS also here
	HasGoVersionFail bool
	Threshold        float64
	Coverage         float64
	HasCoverageFail  bool
	CoverProfile     string
	DependencyGraph  string
	Updates          []RequireUpdate
	VulnCheck        string
	HasVuln          bool
	HasErrors        bool
	Errors           []string
	Warnings         []string
	TestResult       string
	Profiles         []Profile
	// contains filtered or unexported fields
}

func NewAnalyser

func NewAnalyser() *Analyser

func (*Analyser) CheckThreshold

func (a *Analyser) CheckThreshold() error

func (*Analyser) GetCoverageInterpretation

func (a *Analyser) GetCoverageInterpretation() string

func (*Analyser) GetDependencyGraph

func (a *Analyser) GetDependencyGraph() []Dependency

func (*Analyser) GetErrors

func (a *Analyser) GetErrors() []string

func (*Analyser) GetProfiles added in v0.15.1

func (a *Analyser) GetProfiles() []Profile

func (*Analyser) GetUpdatableDependencies

func (a *Analyser) GetUpdatableDependencies() []Dependency

GetUpdatableDependencies Deprecated: we now use the list of Requirements from the go.mod file: use here SetUpdatableDependencies

func (*Analyser) GetWarnings

func (a *Analyser) GetWarnings() []string

func (*Analyser) PushError

func (a *Analyser) PushError(err string) *Analyser

func (*Analyser) PushWarning

func (a *Analyser) PushWarning(warning string) *Analyser

func (*Analyser) SetCoverProfile

func (a *Analyser) SetCoverProfile(coverProfile string) *Analyser

func (*Analyser) SetCoverageByTotal

func (a *Analyser) SetCoverageByTotal(totalText string) *Analyser

func (*Analyser) SetDependencyGraph

func (a *Analyser) SetDependencyGraph(dependencyGraph string) *Analyser

func (*Analyser) SetGoVersion

func (a *Analyser) SetGoVersion(goVersion string) *Analyser

func (*Analyser) SetModule added in v0.15.0

func (a *Analyser) SetModule() *Analyser

func (*Analyser) SetThreshold

func (a *Analyser) SetThreshold(threshold float64) *Analyser

func (*Analyser) SetUpdatableRequirements added in v0.15.0

func (a *Analyser) SetUpdatableRequirements()

func (*Analyser) SetVulnCheck

func (a *Analyser) SetVulnCheck(vulnCheck string) *Analyser

type Dependency

type Dependency struct {
	From      string
	To        string
	Version   string
	Updatable bool
	UpdateTo  string
}

type GoMod added in v0.15.0

type GoMod struct {
	Module    ModPath
	Go        string
	Toolchain string
	Require   []Require
	Exclude   []Module
	Replace   []Replace
	Retract   []Retract
}

type ModPath added in v0.15.0

type ModPath struct {
	Path       string
	Deprecated string
}

type Module added in v0.15.0

type Module struct {
	Path    string
	Version string
}

type Profile

type Profile struct {
	Folder   string
	Coverage float64
	Duration float64
}

type Replace added in v0.15.0

type Replace struct {
	Old Module
	New Module
}

type Require added in v0.15.0

type Require struct {
	Path     string
	Version  string
	Indirect bool
}

type RequireUpdate added in v0.15.0

type RequireUpdate struct {
	Path             string
	Version          string
	AvailableVersion string
	Indirect         bool
}

type Retract added in v0.15.0

type Retract struct {
	Low       string
	High      string
	Rationale string
}

Jump to

Keyboard shortcuts

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