From de9c3bc629f7e712b3cd84b280db6a32b9bc7030 Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Mon, 14 Dec 2020 16:22:22 -0500 Subject: Fix linting and add to CI --- .ci/lint.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .ci/lint.sh (limited to '.ci/lint.sh') diff --git a/.ci/lint.sh b/.ci/lint.sh new file mode 100755 index 0000000..cde7292 --- /dev/null +++ b/.ci/lint.sh @@ -0,0 +1,12 @@ +# binary will be $(go env GOPATH)/bin/golangci-lint +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 +# or install it into ./bin/ +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.30.0 +# In alpine linux (as it does not come with curl by default) +wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.30.0 + +export PATH=$PATH:$(go env GOPATH)/bin + +golangci-lint --version + +golangci-lint run --max-same-issues 0 \ No newline at end of file -- cgit v1.2.3 From b89114d6abd140dcd1fbf6e4e64fcba508a9f59c Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Thu, 17 Dec 2020 14:14:19 -0500 Subject: Address comments --- .ci/lint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.ci/lint.sh') diff --git a/.ci/lint.sh b/.ci/lint.sh index cde7292..e2ee0ce 100755 --- a/.ci/lint.sh +++ b/.ci/lint.sh @@ -9,4 +9,4 @@ export PATH=$PATH:$(go env GOPATH)/bin golangci-lint --version -golangci-lint run --max-same-issues 0 \ No newline at end of file +golangci-lint run --max-same-issues 0 -- cgit v1.2.3 From 5f6acbf70cb34f8e7978ae5ef4b2c323b2605ff4 Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Thu, 17 Dec 2020 14:14:45 -0500 Subject: Reduce overhead in ci lint script --- .ci/lint.sh | 4 ---- 1 file changed, 4 deletions(-) (limited to '.ci/lint.sh') diff --git a/.ci/lint.sh b/.ci/lint.sh index e2ee0ce..e5363a8 100755 --- a/.ci/lint.sh +++ b/.ci/lint.sh @@ -1,9 +1,5 @@ # binary will be $(go env GOPATH)/bin/golangci-lint curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 -# or install it into ./bin/ -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.30.0 -# In alpine linux (as it does not come with curl by default) -wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.30.0 export PATH=$PATH:$(go env GOPATH)/bin -- cgit v1.2.3