gommit

package
v2.1.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2018 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion() string

GetVersion return app version

func IsZeroMatching

func IsZeroMatching(matching *Matching) bool

IsZeroMatching checks if Matching struct equals zero

func MatchRangeCommitQuery

func MatchRangeCommitQuery(query RangeCommitQuery) (*[]*Matching, error)

MatchRangeCommitQuery triggers regexp matching against a range of commit messages

Types

type CommitQuery

type CommitQuery struct {
	Path     string
	ID       string
	Matchers map[string]string
	Options  Options
}

CommitQuery to retrieves a commit and do checking

type Matching

type Matching struct {
	Context      map[string]string
	MessageError error
	SummaryError error
}

Matching represents an error when something goes wrong

func MatchCommitQuery

func MatchCommitQuery(query CommitQuery) (*Matching, error)

MatchCommitQuery triggers regexp matching against a commit

func MatchMessageQuery

func MatchMessageQuery(query MessageQuery) (*Matching, error)

MatchMessageQuery triggers regexp matching against a message

type MessageQuery

type MessageQuery struct {
	Message  string
	Matchers map[string]string
	Options  Options
}

MessageQuery to check only commit message

type Options

type Options struct {
	CheckSummaryLength  bool
	ExcludeMergeCommits bool
	SummaryLength       int
}

Options represents options picked from configuration

type RangeCommitQuery

type RangeCommitQuery struct {
	Path     string
	From     string
	To       string
	Matchers map[string]string
	Options  Options
}

RangeCommitQuery to retrieves commits and do checking

Jump to

Keyboard shortcuts

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