...
1#!/bin/bash
2set -euo pipefail
3IFS=$'\n\t'
4
5# Static analysis scripts
6cd $(dirname $0)/..
7
8echo "Linting code."
9test -z "$(golint `go list ./...` | tee /dev/stderr)"
10
11echo "Examining source code against code defect."
12go vet $(go list ./...)
13go vet -vettool=$(which shadow)
14
15echo "Running staticcheck toolset."
16staticcheck ./...
17
18echo "Checking if code contains security issues."
19gosec -quiet ./...
20
21echo "Running tests with data race detector"
22go test ./... -race
View as plain text