airshipui/tools/install_linter
Gary Smith 252c00c780 Integrate golangci-lint linter
Integrate golangci-lint, which is a full-featured linter tool that
includes the checks from 'go vet' and many more.  Borrowed the
install_linter script from airship/airshipctl to install the script
from upstream. Address issues uncovered by the tool.

Change-Id: If30e0819f5d03243e4004bca07951f8aa5218749
2019-12-13 18:57:22 +00:00

12 lines
324 B
Bash
Executable File

#!/bin/bash
set -x
tools_bin_dir="${BASH_SOURCE%/*}"
download_url=https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh
version=v1.21.0
if ! curl -sfL "$download_url" | sh -s -- -b "$tools_bin_dir/bin" "$version"; then
printf "Something went wrong while installing golangci-lint\n" 1>&2
exit 1
fi