MCPcopy Create free account

hub / github.com/divan/depscheck / functions

Functions78 in github.com/divan/depscheck

↓ 17 callersFunctioncheckSelector
(src string, t *testing.T, r *Result, fn string, count, loc, loccum, depth, depthint int)
deps_test.go:123
↓ 14 callersFunctioncheckCount
(src string, t *testing.T, r *Result, want int)
deps_test.go:117
↓ 14 callersFunctiongetResult
(t *testing.T, isInternal bool, name string, sources ...string)
deps_test.go:105
↓ 9 callersMethodID
ID generates uniqie string ID for this selector.
selector.go:42
↓ 6 callersFunctionIsStdlib
IsStdlib attempts to check if package belongs to stdlib.
package.go:56
↓ 5 callersMethodBar
()
test/sample/sample.go:27
↓ 5 callersMethodDepth
Depth returns Depth for Selector and all it's external dependencies.
selector.go:80
↓ 5 callersMethodDepthInternal
DepthInternal returns Depth for Selector and all it's internal dependencies.
selector.go:97
↓ 5 callersMethodLOCCum
LOCCum returns cumulative LOC count for Selector and all it's dependencies.
selector.go:66
↓ 4 callersMethodAppend
Append adds new Selector to Deps.
selector.go:143
↓ 4 callersFunctionIsInternal
IsInternal returns true if subpkg is a subpackage of pkg.
package.go:31
↓ 3 callersMethodAll
All returns all known selectors in result.
result.go:94
↓ 3 callersMethodIsFunc
IsFunc returns true if Selector is either a function or a method.
selector.go:114
↓ 3 callersMethodPackagesStats
PackagesStats returns stats by packages in all selectors.
pkgstats.go:32
↓ 3 callersMethodWalkObject
WalkObject builds Selector from the given pkg and object. It recursively goes into nested functions/calls adding it as Deps.
walker.go:94
↓ 2 callersMethodFoo
(int)
test/foo/foo.go:10
↓ 2 callersFunctionNewSelector
NewSelector creates new Selector.
selector.go:50
↓ 2 callersFunctionNewWalker
NewWalker inits new AST walker.
walker.go:25
↓ 2 callersMethodTopWalk
TopWalk walks the initial package, looking only for selectors from imported packages.
walker.go:55
↓ 1 callersMethodAdd
Add adds new selector to the result.
result.go:25
↓ 1 callersFunctionBar
(x int)
test/bar/bar.go:3
↓ 1 callersMethodCanBeAvoided
CanBeAvoided attempts to classify if package usage is small enough to suggest user to avoid this package as a dependency and instead copy/embed it's c
pkgstats.go:57
↓ 1 callersMethodFindDefDecl
FindDefDecl searches for declaration and definition for the given object.
walker.go:191
↓ 1 callersMethodFnDecl
FnDecl searches for the FuncDecl based on ast.Ident node.
walker.go:205
↓ 1 callersFunctionFoo
(x int)
test/bar/bar.go:9
↓ 1 callersMethodHasRecursion
HasRecursion attempts to find selector in nested dependencies to avoid recursion.
selector.go:154
↓ 1 callersMethodLOC
LOC calculates readl Lines Of Code for the given function node. node must be ast.FuncDecl, panics otherwise.
walker.go:224
↓ 1 callersMethodLookupObject
LookupObject searches for the object in current package by ast.Ident node.
walker.go:251
↓ 1 callersFunctionNewPackage
NewPackage creates new Package.
package.go:17
↓ 1 callersFunctionNewPackageStat
NewPackageStat creates new PackageStat.
pkgstats.go:20
↓ 1 callersFunctionNewResult
NewResult inits new Result.
result.go:17
↓ 1 callersMethodPrintPackagesStats
PrintPackagesStats prints package stats to stdout in a pretty table form.
result.go:69
↓ 1 callersMethodPrintStats
PrintStats prints results to stdout in a pretty table form.
result.go:34
↓ 1 callersFunctionSampleFunc
()
test/sample/sample.go:7
↓ 1 callersMethodString
String implements Stringer for Totals type.
result.go:159
↓ 1 callersMethodSuggestions
Suggestions analyzes results and print suggestions on deps. It attempts to suggest which dependencies could be copied to your source because of its s
result.go:113
↓ 1 callersMethodTotals
Totals computes Totals for Result.
result.go:144
↓ 1 callersMethodWalkFuncBody
WalkFuncBody searches for all internal or external selectors, used in a given function. It recursively goes into it, building Deps slice.
walker.go:157
↓ 1 callersMethodWalkPackage
WalkPackage looks for dependencies used in a given package and saves selectors to result. It should be called for the top-level package only. Only ex
walker.go:68
↓ 1 callersFunctionXfunc
()
test/sample/sample.go:15
↓ 1 callersFunctionYFunc
()
test/sample/sample.go:22
↓ 1 callersFunctiongetStdPkgs
getStdPkgs tries to get list of stdlib packages by reading GOROOT This approach is used by "go list std" tool Based on go/cmd function matchPackages
package.go:72
↓ 1 callersMethodprintDeps
(depth int)
selector.go:123
↓ 1 callersFunctionprintType
(t types.Type)
walker.go:261
FunctionBar
(x int)
test/recursion.go:14
FunctionBenchmarkIsInternal
(b *testing.B)
package_test.go:36
FunctionBenchmarkIsStdlibFalse
(b *testing.B)
package_test.go:30
FunctionBenchmarkIsStdlibTrue
(b *testing.B)
package_test.go:25
FunctionFoo
(foo foo.Fooer)
test/interface.go:5
FunctionFoo
(x int)
test/recursion.go:8
FunctionFoo
(x int)
test/foo/foo.go:13
MethodLen
()
selector.go:133
MethodLen
()
pkgstats.go:83
MethodLess
(i, j int)
selector.go:135
MethodLess
(i, j int)
pkgstats.go:85
MethodPrintDeps
PrintDeps recursively prints deps for selector.
selector.go:119
MethodPrintDeps
PrintDeps recursively print deps for all selectors found.
result.go:103
MethodString
String implements Stringer interface for Selector.
selector.go:27
MethodString
String implements Stringer for PackageStat.
pkgstats.go:27
MethodSwap
(i, j int)
selector.go:134
MethodSwap
(i, j int)
pkgstats.go:84
FunctionTestConsts
(t *testing.T)
deps_test.go:51
FunctionTestExportedFuncs
(t *testing.T)
deps_test.go:8
FunctionTestInterface
(t *testing.T)
deps_test.go:71
FunctionTestInternal
(t *testing.T)
deps_test.go:82
FunctionTestPackageChecks
(t *testing.T)
package_test.go:7
FunctionTestRecursion
(t *testing.T)
deps_test.go:40
FunctionTestVars
(t *testing.T)
deps_test.go:61
FunctionUsage
Usage prints usage information for this program.
main.go:63
FunctionXtest
()
test/pkg_dot.go:7
FunctionXtest
()
test/exported2.go:7
FunctionXtest
()
test/pkg_renamed.go:7
FunctionXtest
()
test/exported.go:16
Functioninit
()
package.go:24
Functionmain
()
main.go:19
Functionmain
()
test/const.go:8
Functionmain
()
test/external.go:9
Functionmain
()
test/var.go:8