Re: [go-nuts] go fmt and CI (e.g. gitlab)

2018-02-20 Thread Jérôme LAFORGE
Thx, it is perfect. Le lundi 19 février 2018 20:35:48 UTC+1, Stéphane Jeandeaux a écrit : > > > Hi Jerome, > > You can take a look at git hooks https://golang.org/misc/git/pre-commit. > > Code: > test -z "$(gofmt -s -l $(find . -name '*.go' -type f -print) | tee > /dev/stderr)" > > Thanks and

Re: [go-nuts] go fmt and CI (e.g. gitlab)

2018-02-19 Thread Stéphane Jeandeaux
Hi Jerome, You can take a look at git hooks https://golang.org/misc/git/pre-commit. Code: test -z "$(gofmt -s -l $(find . -name '*.go' -type f -print) | tee /dev/stderr)" Thanks and regards, Stephane Jeandeaux. On Mon, Feb 19, 2018 at 6:44 AM Jérôme LAFORGE wrote: >

[go-nuts] go fmt and CI (e.g. gitlab)

2018-02-19 Thread Jérôme LAFORGE
Hello Gophers, Has any one of you setted up the validation of format (goimports, go fmt) into Gitlab CI? My goal is to reject the commit that doesn't respect the Go's format. Thx in adv BR -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To