Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintRepoResults

func PrintRepoResults(w linewriter.Writer, r *Results)

    PrintRepoResults emits the results in human-readable form to the io.Writer.

    func PrintSummary

    func PrintSummary(w linewriter.Writer, sum Summary)

    Types

    type AuthorCommits

    type AuthorCommits struct {
    	Author  string
    	Commits []commit.Commit
    }

    type ExtensionFileStats

    type ExtensionFileStats struct {
    	Name  string
    	Stats object.FileStats
    }

    type Results

    type Results struct {
    	RepoName string
    	Commits  []commit.Commit
    }

      Results is the pre-processed raw commit data.

      func MergeResults

      func MergeResults(rs ...*Results) *Results

      func (*Results) FileStats

      func (r *Results) FileStats() []commit.FileStat

      func (Results) Summary

      func (r Results) Summary() Summary

      type Scanner

      type Scanner struct {
      	Since time.Time
      }

        Scanner describes the rough metadata for the repo analyzer.

        func (*Scanner) Clone

        func (s *Scanner) Clone(repo *github.Repository) (*Results, error)

          Clone produces Results for a GitHub repo and handles cloning.

          func (*Scanner) Repo

          func (s *Scanner) Repo(gitRoot string) (*Results, error)

            Repo produces results for the repo described at gitRoot.

            type Summary

            type Summary struct {
            	TotalCommits        int
            	SortedAuthorCommits []AuthorCommits
            	SortedTopFiles      []object.FileStat
            	SortedTopExtensions []ExtensionFileStats
            }