https://github.com/msoap/docker-golang-checks
Docker image for Go-code checks
https://github.com/msoap/docker-golang-checks
docker-image golang golint
Last synced: 11 months ago
JSON representation
Docker image for Go-code checks
- Host: GitHub
- URL: https://github.com/msoap/docker-golang-checks
- Owner: msoap
- Created: 2016-06-16T19:11:45.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-18T22:03:48.000Z (over 9 years ago)
- Last Synced: 2025-04-13T13:35:13.765Z (about 1 year ago)
- Topics: docker-image, golang, golint
- Language: Shell
- Size: 10.7 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go-code checks Docker image
[](https://hub.docker.com/r/msoap/golang-checks/)
[](https://hub.docker.com/r/msoap/golang-checks/)
[](https://microbadger.com/images/msoap/golang-checks)
GOPATH in container set to `/go:/app`
Get:
docker pull msoap/golang-checks
Run all checks (without gometalinter):
docker run -i --rm -v "$PWD":/app msoap/golang-checks go-checks.sh .
# alpine version:
docker run -i --rm -v "$PWD":/app msoap/golang-checks:alpine go-checks.sh .
# if your code use vendor and must been in GOPATH, run from local GOPATH:
docker run -i --rm -v "$PWD":/app/src/project-name -w /app/src/project-name msoap/golang-checks go-checks.sh .
Run gometalinter:
docker run -i --rm -v "$PWD":/app -w /app msoap/golang-checks gometalinter .
Run tests only:
docker run -i --rm -v "$PWD":/app -w /app msoap/golang-checks go test -v -race -cover
Run custom checks from shell:
docker run -it --rm -v "$PWD":/app -w /app msoap/golang-checks bash
Show test covearge:
docker run -i --rm -v "$PWD":/app -w /app msoap/golang-checks go-carpet -256colors | less
Show tools list:
docker run --rm msoap/golang-checks ls /go/bin
go-checks.sh run tools:
* go test -v
* go vet
* golint
* errcheck
* `diff -u <(gofmt -d *.go) <(echo -n)`
Pre-installed tools:
* [golint](https://github.com/golang/lint)
* [errcheck](https://github.com/kisielk/errcheck)
* [go-carpet](https://github.com/msoap/go-carpet)
* [gometalinter](https://github.com/alecthomas/gometalinter), and all tools for it