authorship

package
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2014 License: BSD-3-Clause, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorStats

type AuthorStats struct {
	AuthorshipInfo

	// DefCount is the number of defs that this author contributed (where
	// "contributed" means "committed any hunk of code to source code files").
	DefCount int `db:"def_count"`

	DefsProportion float64 `db:"defs_proportion"`

	// ExportedDefCount is the number of exported defs that this author
	// contributed (where "contributed to" means "committed any hunk of code to
	// source code files").
	ExportedDefCount int `db:"exported_def_count"`

	ExportedDefsProportion float64 `db:"exported_defs_proportion"`
}

type AuthorshipInfo

type AuthorshipInfo struct {
	AuthorEmail    string    `db:"author_email"`
	LastCommitDate time.Time `db:"last_commit_date"`

	// LastCommitID is the commit ID of the last commit that this author made to
	// the thing that this info describes.
	LastCommitID string `db:"last_commit_id"`
}

type ClientStats

type ClientStats struct {
	AuthorshipInfo

	// DefRepo is the repository that defines defs that this client
	// referred to.
	DefRepo repo.URI `db:"def_repo"`

	// DefUnitType and DefUnit are the unit in DefRepo that defines
	// defs that this client referred to. If DefUnitType == "" and
	// DefUnit == "", then this ClientStats is an aggregate of this client's
	// refs to all units in DefRepo.
	DefUnitType nnz.String `db:"def_unit_type"`
	DefUnit     nnz.String `db:"def_unit"`

	// RefCount is the number of references this client made in this repository
	// to DefRepo.
	RefCount int `db:"ref_count"`
}

type ComputeUnitAuthorshipRule added in v0.0.9

type ComputeUnitAuthorshipRule struct {
	Unit        *unit.SourceUnit
	BlameOutput string
	GraphOutput string
	// contains filtered or unexported fields
}

func (*ComputeUnitAuthorshipRule) Prereqs added in v0.0.9

func (r *ComputeUnitAuthorshipRule) Prereqs() []string

func (*ComputeUnitAuthorshipRule) Recipes added in v0.0.9

func (r *ComputeUnitAuthorshipRule) Recipes() []string

func (*ComputeUnitAuthorshipRule) SourceUnit added in v0.0.22

func (r *ComputeUnitAuthorshipRule) SourceUnit() *unit.SourceUnit

func (*ComputeUnitAuthorshipRule) Target added in v0.0.9

func (r *ComputeUnitAuthorshipRule) Target() string

type DefAuthor added in v0.0.9

type DefAuthor struct {
	UID   nnz.Int
	Email nnz.String
	DefAuthorship
}

type DefAuthorship added in v0.0.9

type DefAuthorship struct {
	AuthorshipInfo

	// Exported is whether the def is exported.
	Exported bool

	Chars           int     `db:"chars"`
	CharsProportion float64 `db:"chars_proportion"`
}

type DefClient added in v0.0.9

type DefClient struct {
	UID   nnz.Int
	Email nnz.String

	AuthorshipInfo

	// UseCount is the number of times this person referred to the def.
	UseCount int `db:"use_count"`
}

type RefAuthorship

type RefAuthorship struct {
	graph.RefKey
	AuthorshipInfo
}

RefAuthorship describes the authorship information (author email, date, and commit ID) of a ref. A ref may only have one author.

type RepoAuthor

type RepoAuthor struct {
	UID   nnz.Int
	Email nnz.String
	AuthorStats
}

type RepoClient

type RepoClient struct {
	UID   nnz.Int
	Email nnz.String
	ClientStats
}

type RepoContribution

type RepoContribution struct {
	RepoURI repo.URI `db:"repo"`
	AuthorStats
}

type RepoUsageByClient

type RepoUsageByClient struct {
	// DefRepo is the repository that defines the code that was referenced.
	// It's called DefRepo because "Repo" usually refers to the repository
	// whose analysis created this linkage (i.e., the repository that contains
	// the reference).
	DefRepo repo.URI `db:"def_repo"`

	RefCount int `db:"ref_count"`

	AuthorshipInfo
}

RepoUsageByClient describes a repository whose code is referenced by a specific person.

type RepoUsageOfAuthor

type RepoUsageOfAuthor struct {
	Repo repo.URI

	RefCount int `db:"ref_count"`
}

RepoUsageOfAuthor describes a repository referencing code committed by a specific person.

type SourceUnitOutput added in v0.0.9

type SourceUnitOutput struct {
	Defs                map[graph.DefPath][]*DefAuthorship
	Refs                []*RefAuthorship
	Authors             []*AuthorStats
	ClientsOfOtherUnits []*ClientStats
}

func ComputeSourceUnit added in v0.0.9

func ComputeSourceUnit(g *grapher.Output, b *vcsutil.BlameOutput) (*SourceUnitOutput, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL