MCPcopy Index your code
hub / github.com/perkeep/perkeep / hookPreCommit

Method hookPreCommit

dev/devcam/hook.go:139–144  ·  view source on GitHub ↗

hookPreCommit does the following checks, in order: gofmt, and trailing space. If appropriate, any one of these checks prints the action required from the user, and the following checks are not performed.

(args []string)

Source from the content-addressed store, hash-verified

137// required from the user, and the following checks are not
138// performed.
139func (c *hookCmd) hookPreCommit(args []string) (err error) {
140 if err = c.hookGofmt(); err != nil {
141 return err
142 }
143 return c.hookTrailingSpace()
144}
145
146// hookGofmt runs a gofmt check on the local files matching the files in the
147// git staging area.

Callers 1

RunCommandMethod · 0.95

Calls 2

hookGofmtMethod · 0.95
hookTrailingSpaceMethod · 0.95

Tested by

no test coverage detected