Documentation
¶
Overview ¶
Package repoinfo characterizes a repository from local git commands only (no network). It powers the `zero repo-info` command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotGitRepo = errors.New("not a git repository, or it has no commits yet")
ErrNotGitRepo is returned when the directory is not a git repository or HEAD has no commits (git ls-tree against HEAD fails).
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
FileCount int `json:"fileCount"`
DirectoryCount int `json:"directoryCount"`
MaxDepth int `json:"maxDepth"`
LOCEstimate int `json:"locEstimate"`
Languages []LangStat `json:"languages"`
PrimaryLanguage string `json:"primaryLanguage,omitempty"`
LanguageCount int `json:"languageCount"`
WorkspaceType string `json:"workspaceType"`
WorkspacePackageCount int `json:"workspacePackageCount"`
BuildTools []string `json:"buildTools"`
TestTools []string `json:"testTools"`
CICD []string `json:"cicd"`
HasGit bool `json:"hasGit"`
Branch string `json:"branch,omitempty"`
RemoteURL string `json:"remoteURL,omitempty"`
AgeDays *int `json:"ageDays,omitempty"`
Contributors90d *int `json:"contributors90d,omitempty"`
CommitVelocity30d *int `json:"commitVelocity30d,omitempty"`
BranchCount *int `json:"branchCount,omitempty"`
CommitCount *int `json:"commitCount,omitempty"`
TagCount *int `json:"tagCount,omitempty"`
}
Info is the collected repository characterization.
type LangStat ¶
type LangStat struct {
Name string `json:"name"`
LOCEstimate int `json:"locEstimate"`
FileCount int `json:"fileCount"`
}
LangStat is a per-language rollup.
Click to show internal directories.
Click to hide internal directories.