Documentation ¶
Overview ¶
Copyright (c) 2015-2016 The GoAnalysis Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- func GetCyclomaticComplexity(cfg *cfgraph.ControlFlowGraph) int
- type FunctionComplexity
- func (function *FunctionComplexity) GetNumberOfEdges() int
- func (function *FunctionComplexity) GetNumberOfNodes() int
- func (function *FunctionComplexity) GetNumberOfSCC() int
- func (function *FunctionComplexity) GetSCComponents() []*graph.StronglyConnectedComponent
- func (funCC *FunctionComplexity) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCyclomaticComplexity ¶
func GetCyclomaticComplexity(cfg *cfgraph.ControlFlowGraph) int
Types ¶
type FunctionComplexity ¶
type FunctionComplexity struct { Name string //Function name. SrcLine int //Line number in source file where func is declared. Complexity int //Cyclomatic complexity value. ControlFlowGraph *cfgraph.ControlFlowGraph //Control-flow graph in function. BasicBlocks []*bblock.BasicBlock //Basic-blocks in function. }
FunctionComplexity represents cyclomatic complexity in a function or method.
func GetCyclomaticComplexityFunctionLevel ¶
func GetCyclomaticComplexityFunctionLevel(goFilePath string, goSrcFile []byte) (functions []*FunctionComplexity, err error)
func (*FunctionComplexity) GetNumberOfEdges ¶
func (function *FunctionComplexity) GetNumberOfEdges() int
func (*FunctionComplexity) GetNumberOfNodes ¶
func (function *FunctionComplexity) GetNumberOfNodes() int
func (*FunctionComplexity) GetNumberOfSCC ¶
func (function *FunctionComplexity) GetNumberOfSCC() int
func (*FunctionComplexity) GetSCComponents ¶
func (function *FunctionComplexity) GetSCComponents() []*graph.StronglyConnectedComponent
func (*FunctionComplexity) String ¶
func (funCC *FunctionComplexity) String() string
Directories ¶
Path | Synopsis |
---|---|
stack
Package graph.stack provides an implementation of the Stack abstract-datastructure, basically providing the standard graph.stack operating primitives.
|
Package graph.stack provides an implementation of the Stack abstract-datastructure, basically providing the standard graph.stack operating primitives. |
Click to show internal directories.
Click to hide internal directories.