gommit

package
Version: v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

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 MatchRangeQuery

func MatchRangeQuery(query RangeQuery) (*[]*Matching, error)

MatchRangeQuery 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 RangeQuery

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

RangeQuery to retrieves commits and do checking

Jump to

Keyboard shortcuts

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