Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

readme: archival notice #483

readme: archival notice

readme: archival notice #483

Workflow file for this run

name: golang/static
on: pull_request
jobs:
vet:
name: vet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go mod download
- run: go vet ./...
shadow:
name: Shadow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go get -v golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
- run: go mod download
- run: go vet -vettool=$HOME/go/bin/shadow ./...
imports:
name: imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go get -v golang.org/x/tools/cmd/goimports
- run: d="$($HOME/go/bin/goimports -d ./)" && if [ -n "$d" ]; then echo "goimports generated output:" ; echo "$d"; exit 1; fi
staticcheck:
name: staticheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go install honnef.co/go/tools/cmd/staticcheck
- run: $HOME/go/bin/staticcheck ./...
errcheck:
name: errcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go get -v github.com/kisielk/errcheck
- run: set +e ; d="$($HOME/go/bin/errcheck -ignoretests -asserts -ignoregenerated ./... | grep -v internal)"; if [ -n "$d" ]; then echo "errcheck output:" ; echo "$d"; exit 1; else exit 0 ; fi ; set -e
sec:
name: sec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go get -v github.com/securego/gosec/cmd/gosec
- run: GO111MODULE=on $HOME/go/bin/gosec -exclude=G101,G104,G204,G304 ./...
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go get -v golang.org/x/lint/golint
- run: set +e ; d="$($HOME/go/bin/golint -min_confidence 1 ./... | grep -v comment)" ; if [ -z "$d" ]; then exit 0 ; else echo "golint check output:" ; echo "$d" ; exit 1 ; fi ; set -e
exportloopref:
name: exportloopref
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go get -v github.com/kyoh86/exportloopref/cmd/exportloopref
- run: $HOME/go/bin/exportloopref ./...
exhaustive:
name: exhaustive
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go get -v github.com/nishanths/exhaustive/...
- run: $HOME/go/bin/exhaustive -default-signifies-exhaustive ./...