Documentation ¶
Index ¶
- Constants
- type BlameLine
- type BlameResult
- type Branch
- type CodeInfoTimings
- type Commit
- type CommitCode
- type CommitFile
- type CommitStatus
- type License
- type Opts
- type Ripsrc
- func (s *Ripsrc) Branches(ctx context.Context, res chan Branch) error
- func (s *Ripsrc) BranchesSlice(ctx context.Context) (res []Branch, _ error)
- func (s *Ripsrc) Code(ctx context.Context, res chan BlameResult) error
- func (s *Ripsrc) CodeByCommit(ctx context.Context, res chan CommitCode) error
- func (s *Ripsrc) CodeSlice(ctx context.Context) (res []BlameResult, _ error)
Constants ¶
View Source
const ( // GitFileCommitStatusAdded is the added status GitFileCommitStatusAdded = commitmeta.GitFileCommitStatusAdded // GitFileCommitStatusModified is the modified status GitFileCommitStatusModified = commitmeta.GitFileCommitStatusModified // GitFileCommitStatusRemoved is the removed status GitFileCommitStatusRemoved = commitmeta.GitFileCommitStatusRemoved )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlameLine ¶
type BlameLine struct { Name string Email string Date time.Time Comment bool Code bool Blank bool SHA string }
BlameLine is a single line entry in blame
type BlameResult ¶
type BlameResult struct { Commit Commit Language string Filename string Lines []*BlameLine Size int64 Loc int64 Sloc int64 Comments int64 Blanks int64 Complexity int64 WeightedComplexity float64 Skipped string License *License Status CommitStatus }
BlameResult holds details about the blame result
type CodeInfoTimings ¶
func (*CodeInfoTimings) OutputStats ¶
func (s *CodeInfoTimings) OutputStats(wr io.Writer)
type CommitCode ¶
type CommitCode struct { Commit Blames chan BlameResult }
type CommitFile ¶
type CommitFile = commitmeta.CommitFile
CommitFile is a specific detail around a file in a commit
type CommitStatus ¶
type CommitStatus = commitmeta.CommitStatus
CommitStatus is a commit status type
type Opts ¶
type Opts struct { // RepoDir git repo to run commands on. RepoDir string // Logger object for info and debug. Logger logger.Logger // CheckpointsDir is the directory to store incremental data cache for this repo. // If empty, directory is created inside repoDir. CheckpointsDir string // NoStrictResume forces incremental processing to avoid checking that it continues from the same commit in previously finished on. Since incrementals save a large number of previous commits, it works even starting on another commit. NoStrictResume bool // CommitFromIncl process starting from this commit (including this commit). CommitFromIncl string // CommitFromMakeNonIncl by default we start from passed commit and include it. Set CommitFromMakeNonIncl to true to avoid returning it, and skipping reading/writing checkpoint. CommitFromMakeNonIncl bool // IncrementalIgnoreBranchesOlderThan provides a way to ignore old branches in incremental processing. // Default is time.Now() - 90 * day // BUG: this field is ignored, only processing HEAD branch in incrementals right now IncrementalIgnoreBranchesOlderThan time.Time // AllBranches set to true to process all branches. If false, processes HEAD only. // BUG: in incrementals only processing HEAD branch AllBranches bool // BranchesUseOrigin by default ripsrc lists only local branches when using Branches method. Set this to true to use origin/ branches instead. BranchesUseOrigin bool // PullRequestSHAs is a list of custom sha references to process similar to branches returned from the repo. PullRequestSHAs []string }
Opts is configuration for running ripsrc on a single repo.
type Ripsrc ¶
type Ripsrc struct { GitProcessTimings process.Timing CodeInfoTimings *CodeInfoTimings // contains filtered or unexported fields }
Ripsrc runs on a single repo.
func (*Ripsrc) BranchesSlice ¶
func (*Ripsrc) Code ¶
func (s *Ripsrc) Code(ctx context.Context, res chan BlameResult) error
Code returns code information using one record per file and commit
func (*Ripsrc) CodeByCommit ¶
func (s *Ripsrc) CodeByCommit(ctx context.Context, res chan CommitCode) error
CodeByCommit returns code information using one record per commit that includes records by file
Click to show internal directories.
Click to hide internal directories.