ccomplexity

package
Version: v0.0.0-...-433e763 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2016 License: BSD-3-Clause Imports: 4 Imported by: 1

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

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.

Jump to

Keyboard shortcuts

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