Documentation
¶
Overview ¶
Package complexity provides the repository's versioned cyclomatic-complexity analysis. Its counting rules deliberately match plans/go-complexity-reduction.md: one plus if/for/range/non-default switch or select cases and &&/||. Decisions in function literals are attributed to the nearest named declaration (or to a package-level function-valued initializer), so the scope is stable over time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
Module string `json:"module"`
Package string `json:"package"`
Path string `json:"path"`
Lines int `json:"lines"`
Test bool `json:"test,omitempty"`
}
File records every analyzed source file, including files without functions.
type Function ¶
type Function struct {
Module string `json:"module"`
Package string `json:"package"`
Path string `json:"path"`
Receiver string `json:"receiver,omitempty"`
Name string `json:"name"`
Complexity int `json:"complexity"`
Lines int `json:"lines"`
FileLines int `json:"file_lines"`
Test bool `json:"test,omitempty"`
}
Function identifies and measures a function or method.
Click to show internal directories.
Click to hide internal directories.