mirror of
https://github.com/harvester/vm-import-controller.git
synced 2025-06-03 01:44:51 +00:00
19 lines
339 B
Bash
Executable File
19 lines
339 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
echo "Running validation"
|
|
|
|
if [[ -z "$(command -v golangci-lint)" ]]; then
|
|
echo "no golangci-lint available, using go fmt/vet instead"
|
|
echo "Running: go fmt"
|
|
go fmt ./...
|
|
echo "Running: go vet"
|
|
go vet -tags=test ./...
|
|
exit
|
|
fi
|
|
|
|
echo "Running: golangci-lint run"
|
|
golangci-lint run --timeout 3m
|