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)
| 137 | // required from the user, and the following checks are not |
| 138 | // performed. |
| 139 | func (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. |
no test coverage detected