Help us shape the future of Go! Take the 2026 Go Developer Survey

complexity

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CognitiveComplexity

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

func NewCognitiveComplexity

func NewCognitiveComplexity() *CognitiveComplexity

func (*CognitiveComplexity) Compute

func (c *CognitiveComplexity) Compute() int

func (*CognitiveComplexity) OnEnterCatch

func (c *CognitiveComplexity) OnEnterCatch()

func (*CognitiveComplexity) OnEnterConditional

func (c *CognitiveComplexity) OnEnterConditional(first bool)

func (*CognitiveComplexity) OnEnterFunction

func (c *CognitiveComplexity) OnEnterFunction()

func (*CognitiveComplexity) OnEnterLoop

func (c *CognitiveComplexity) OnEnterLoop()

func (*CognitiveComplexity) OnEnterSwitch

func (c *CognitiveComplexity) OnEnterSwitch()

func (*CognitiveComplexity) OnExitCatch

func (c *CognitiveComplexity) OnExitCatch()

func (*CognitiveComplexity) OnExitConditional

func (c *CognitiveComplexity) OnExitConditional()

func (*CognitiveComplexity) OnExitFunction

func (c *CognitiveComplexity) OnExitFunction()

func (*CognitiveComplexity) OnExitLoop

func (c *CognitiveComplexity) OnExitLoop()

func (*CognitiveComplexity) OnExitSwitch

func (c *CognitiveComplexity) OnExitSwitch()

func (*CognitiveComplexity) OnJumpToLabel

func (c *CognitiveComplexity) OnJumpToLabel()

func (*CognitiveComplexity) OnRecursiveCall

func (c *CognitiveComplexity) OnRecursiveCall()

func (*CognitiveComplexity) OnSequenceOfLogicalOperators

func (c *CognitiveComplexity) OnSequenceOfLogicalOperators()

type CyclomaticComplexity

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

func NewCyclomaticComplexity

func NewCyclomaticComplexity() *CyclomaticComplexity

func (*CyclomaticComplexity) Compute

func (c *CyclomaticComplexity) Compute() int

func (*CyclomaticComplexity) OnConditional

func (c *CyclomaticComplexity) OnConditional()

func (*CyclomaticComplexity) OnEnterFunction

func (c *CyclomaticComplexity) OnEnterFunction()

func (*CyclomaticComplexity) OnJump

func (c *CyclomaticComplexity) OnJump()

func (*CyclomaticComplexity) OnLogicalOperators

func (c *CyclomaticComplexity) OnLogicalOperators(operators int)

func (*CyclomaticComplexity) OnLoop

func (c *CyclomaticComplexity) OnLoop()

type Result

type Result struct {
	CyclomaticComplexity int
	CognitiveComplexity  int
}

func ComputeKotlinComplexity

func ComputeKotlinComplexity(path string, file kotlin_parser.IKotlinFileContext) Result

Jump to

Keyboard shortcuts

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