Skip to content

Commit

Permalink
Merge pull request linode#120 from Charliekenney23/use-gomod-for-tool…
Browse files Browse the repository at this point in the history
…-deps

Version go tools with go modules
  • Loading branch information
0xch4z authored Apr 10, 2020
2 parents 8cdec6e + 77d0684 commit dfb4315
Show file tree
Hide file tree
Showing 5 changed files with 330 additions and 22 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
dist: trusty
dist: bionic
services:
- docker
language: go
go:
- "1.12.x"
- "1.13.x"

env:
global:
- GOFLAGS=-mod=vendor GO111MODULE=on
- GO111MODULE=on

install:
# This script is used by the Travis build to install a cookie for
Expand All @@ -25,6 +26,7 @@ script:
branches:
only:
- master

matrix:
fast_finish: true
allow_failures:
Expand Down
18 changes: 3 additions & 15 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,20 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
WEBSITE_REPO=github.com/hashicorp/terraform-website
PKG_NAME=linode

TFPROVIDERLINT_IMG := bflad/tfproviderlint
TFPROVIDERLINT_TAG := 0.10.0

MARKDOWNLINT_IMG := 06kellyjac/markdownlint-cli
MARKDOWNLINT_TAG := 0.19.0

GOLANGCILINT := golangci-lint
GOLANGCILINT_IMG := golangci/golangci-lint:v1.23-alpine

lint: fmtcheck
docker run --rm \
-v $$(pwd):/src:ro \
$(TFPROVIDERLINT_IMG):$(TFPROVIDERLINT_TAG) \
go run github.com/golangci/golangci-lint/cmd/golangci-lint run
go run github.com/bflad/tfproviderlint/cmd/tfproviderlint \
-R003=false \
-R005=false \
-R007=false \
-R008=false \
-S006=false \
-S022=false \
./...

docker run --rm \
-v $$(pwd):/src:ro -w /src \
$(GOLANGCILINT_IMG) $(GOLANGCILINT) \
run


docscheck:
docker run --rm \
Expand Down Expand Up @@ -97,4 +86,3 @@ endif
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)

.PHONY: build sweep test testacc vet fmt fmtcheck errcheck test-compile website website-test

3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module github.com/terraform-providers/terraform-provider-linode

require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/bflad/tfproviderlint v0.12.0
github.com/golangci/golangci-lint v1.24.0
github.com/hashicorp/terraform-plugin-sdk v1.7.0
github.com/linode/linodego v0.13.0
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975
Expand Down
Loading

0 comments on commit dfb4315

Please sign in to comment.