Documentation ¶
Overview ¶
Package with wmfp(https://en.wikipedia.org/wiki/Weighted_Micro_Function_Points) metric calculator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Cyclo complexity weights CycloComp cyclo.Weights `xml:"cyclomatic"` // Comments complexity weights Comment comments.Weights `xml:"comment"` // Code structure complexity weights CodeStructComp codestruct.Weights `xml:"codestruct"` // Inline data complexity weights InlineData inline.Weights `xml:"inline"` // Arithmetic expression complexity weights ArithmeticComp arithmetic.Weights `xml:"arithmetic"` // Halstead metric weight Halstead float64 `xml:"halstead"` }
Config with all weights for underlaying metrics
type MeasurerWMFP ¶
type MeasurerWMFP struct { // State of comments metrics Comments *comments.Metric // State of cyclo complexity metrics Cyclo *cyclo.Metric // State of halstead metrics Halst *halstead.Metric // State of complexity of code structure Codestruct *codestruct.Metric // State of complexity of inline data constants InlineData *inline.Metric // State of complexity of arithmetic expressions ArithmeticComp *arithmetic.Metric // contains filtered or unexported fields }
State for WMFP metrics
func NewMeasurerWMFP ¶
func NewMeasurerWMFP(config *Config) MeasurerWMFP
Constructor for WMFP metric
func (*MeasurerWMFP) Finish ¶
func (m *MeasurerWMFP) Finish() (total float64)
Returns final score of metric
func (*MeasurerWMFP) ParseFile ¶
func (m *MeasurerWMFP) ParseFile(file *ast.File)
Parses single file using WMFP metric
Click to show internal directories.
Click to hide internal directories.