edgexfoundry / security-api-gateway

Owner: Security WG
Apache License 2.0
11 stars 10 forks source link

Add gofmt check to test target in makefile #56

Closed anonymouse64 closed 5 years ago

anonymouse64 commented 5 years ago

The makefile should have in the test target a check to ensure that all the go code is formatted using gofmt. See example:

test:
    $(GO) test ./... -cover
    $(GO) vet ./...
    gofmt -l .
    [ "`gofmt -l .`" = "" ] 

although here we don't have any go unit tests here but the latter statements should at least be there.

In the same PR the code will also need to be formatted with gofmt.

lenny-goodell commented 5 years ago

@anonymouse64 , so you are good with "-w" ? ;-)

anonymouse64 commented 5 years ago

whoops no I just copied what you had in your PR's...

lenny-goodell commented 5 years ago

Issue should also include running gofmt to make sure all files are formatted so verify jobs will pass. ;-)

tingyuz commented 5 years ago

Fixed in #66 .

anonymouse64 commented 5 years ago

@tingyuz please do not close issues until the issue is actually merged and fixed in master, i.e. your linked PR may eventually resolve the issue but it is not yet resolved because that PR hasn't been merged.