funcstat

package module
v0.0.0-...-842ddec Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 15 Imported by: 0

README

funcstat

funcstat outputs function stat.

$ go install github.com/gostaticanalysis/funcstat/cmd/funcstat@latest
$ funcstat encoding/json | head
package,file,line,name,lines,bytes,params,returns,cyclomatic complexity
encoding/json,decode.go,96,Unmarshal,87,3970,2,1,1
encoding/json,decode.go,132,Error,6,309,0,1,1
encoding/json,decode.go,149,Error,3,191,0,1,1
encoding/json,decode.go,159,Error,10,263,0,1,1
encoding/json,decode.go,170,unmarshal,15,320,1,1,1
encoding/json,decode.go,191,String,2,102,0,1,1
encoding/json,decode.go,194,Float64,4,132,0,2,1
encoding/json,decode.go,199,Int64,4,127,0,2,1
encoding/json,decode.go,222,readIndex,4,116,0,1,1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:       "funcstat",
	Doc:        doc,
	Run:        run,
	ResultType: reflect.TypeOf((map[*ast.FuncDecl]*Result)(nil)),
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
		ctrlflow.Analyzer,
	},
}

Functions

This section is empty.

Types

type Result

type Result struct {
	Func                 *ast.FuncDecl
	Name                 *ast.Ident
	Lines                int
	Bytes                int
	NumParams            int
	NumResults           int
	CyclomaticComplexity int
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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