Skip to content

Commit

Permalink
provider: add tflinter (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte authored Nov 6, 2019
1 parent d1041c2 commit c4de9dd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ matrix:
include:
- name: "make lint"
script: make lint
- name: "make tflint"
script: make tflint
- name: "make test"
script: make test
- name: "make website-lint"
Expand Down
18 changes: 13 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ GOFLAGS=-mod=vendor

default: build

tools:
@echo "==> installing required tooling..."
@sh "$(CURDIR)/scripts/gogetcookie.sh"
GO111MODULE=off go get -u github.com/client9/misspell/cmd/misspell
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
GO111MODULE=off go get -u github.com/bflad/tfproviderlint/cmd/tfproviderlint

build: fmtcheck
go install

Expand Down Expand Up @@ -39,11 +46,12 @@ lint:
@echo "==> Checking source code against linters..."
golangci-lint run ./... -v

tools:
@echo "==> installing required tooling..."
@sh "$(CURDIR)/scripts/gogetcookie.sh"
GO111MODULE=off go get -u github.com/client9/misspell/cmd/misspell
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
tflint:
@echo "==> Checking source code against terraform provider linters..."
@tfproviderlint \
-R001 -R002 -R003 -R004\
-S001 -S002 -S003 -S004 -S005 -S006 -S007 -S008 -S009 -S010 -S011 -S012 -S013 -S014 -S015 -S016 -S017 -S018 -S019\
./$(PKG_NAME)

test-compile:
@if [ "$(TEST)" = "./..." ]; then \
Expand Down

0 comments on commit c4de9dd

Please sign in to comment.