nornir-automation / gornir

https://godoc.org/github.com/nornir-automation/gornir
Apache License 2.0
156 stars 15 forks source link

enable golint #26

Open dbarrosop opened 5 years ago

dbarrosop commented 5 years ago

enabling golint with with golangci-lint requires some extra handling, we need to enable it and fix the issues raised by it. To enable it, make lint should be:

.PHONY: lint
lint:
    docker run \
        --rm \
        -v $(PWD):/go/src/$(PROJECT) \
        -w /go/src/$(PROJECT) \
        golangci/golangci-lint \
            golangci-lint run
    docker run \
        --rm \
        -v $(PWD):/go/src/$(PROJECT) \
        -w /go/src/$(PROJECT) \
        golangci/golangci-lint \
            golangci-lint run --no-config --exclude-use-default=false --disable-all --enable=golint
nleiva commented 5 years ago

I didn't know GolangCI-Lint. I would normally just go with go fmt, so need to learn more about this option before commenting.