analyzer

package
v0.0.0-...-ba8ab7f Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReportFormatterJSON selects the JSON formatter.
	ReportFormatterJSON string = "json"
)

Variables

This section is empty.

Functions

func GenerateJSONReport

func GenerateJSONReport(reportDirectory string, stats GitStats) error

GenerateJSONReport generates a report in JSON format for the Git stats.

Types

type AnalysisOptions

type AnalysisOptions struct {
	Branch          string
	Path            string
	ReportFormatter string
}

AnalysisOptions controls how the analysis is performed on the repository.

type GitStats

type GitStats struct {
	Branch       string
	CommitCount  int
	OldestCommit time.Time
	LatestCommit time.Time
}

GitStats is a collection of stats about the Git repository itself.

func AnalyzeRepository

func AnalyzeRepository(options AnalysisOptions) (GitStats, error)

AnalyzeRepository analyzes the repository at the given path and collects stats.

type ReportFormatter

type ReportFormatter = func(reportDirectory string, stats GitStats) error

ReportFormatter is a function responsible for generating a report based on Git stats.

func NewReportFormatter

func NewReportFormatter(formatterType string) (ReportFormatter, error)

NewReportFormatter selects the appropriate formatter.

Jump to

Keyboard shortcuts

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