warn

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerData

type HandlerData struct {
	*common.HandlerData
	// contains filtered or unexported fields
}

func NewHandlerData

func NewHandlerData() *HandlerData

func (*HandlerData) ByLevel

func (hd *HandlerData) ByLevel(level warning.Level) *score.Average

func (*HandlerData) CountFor

func (hd *HandlerData) CountFor(level warning.Level) uint64

func (*HandlerData) SetCountFor

func (hd *HandlerData) SetCountFor(level warning.Level, count uint64)

type Original

type Original struct {
	// contains filtered or unexported fields
}

Original contains the original warning score calculations. The newer calculations work differently (more efficiently). This code was kept so that the calculations could be compared. In the fullness of time it may be removed.

func NewOriginal

func NewOriginal(warns *data.Warnings, tagMap map[data.TestTag]bool, levels map[warning.Level]uint) *Original

NewOriginal returns a new Original object.

func (*Original) CheckByDataScores

func (o *Original) CheckByDataScores(handlerData map[data.HandlerTag]*HandlerData)

CheckByDataScores checks the calculated score value for a handler against the value from the original calculation. If the values differ by too much an error is logged.

func (*Original) CheckMaxScore

func (o *Original) CheckMaxScore(maxScore uint)

func (*Original) MakeMaxScore

func (o *Original) MakeMaxScore()

func (*Original) MakeWarnScores

func (o *Original) MakeWarnScores()

func (*Original) Score

func (o *Original) Score(hdlr data.HandlerTag) score.Value

Jump to

Keyboard shortcuts

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