Loading...
Loading...
Analyze Go function lengths within a workspace and generate statistics (p50, p90, p99). Use when you need to audit function complexity, identify long functions, or generate code metrics for Go projects. Only analyzes files matching **/*.go within the current workspace, excluding dependencies.
npx skill4agent add bizshuk/llm_plugin go-function-analysis.gofind . -name "*.go" -type f ! -path "./vendor/*" ! -path "./.git/*" ! -path "*_test.go".go./scripts/analyze_functions.sh <workspace_path>funccount * 0.50count * 0.90count * 0.99README.function.md# Go Function Analysis
Generated: YYYY-MM-DD
## Summary Statistics
| File Path | Function Name | Function Lines | Depth Level | Percentile |
| --------- | ------------- | -------------- | ----------- | ---------- |
| path/to/f | funcName | X | Y | p50 |
| ... | ... | ... | ... | ... |
**Total functions:** N
**Average length:** X lines
## All Functions (sorted by length, descending)
| File Path | Function Name | Function Lines | Depth Level |
| --------- | ------------- | -------------- | ----------- |
| path/to/f | funcName | X | Y |
| ... | ... | ... | ... |func FunctionName(params) returnType {
// body
}
func (receiver Type) MethodName(params) returnType {
// body
}func}func}func example() { // Line 1
fmt.Println() // Line 2
if true { // Line 3
doSomething()// Line 4
} // Line 5
} // Line 6[!NOTE] Only analyzefiles within the workspace. Exclude.go,/vendor/, and external dependencies./.git/
[!TIP] Functions over 50 lines may be candidates for refactoring. p90+ functions often warrant closer review.