mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 10:25:05 +03:00
+tflint
This commit is contained in:
parent
c2dcf4d6a3
commit
c7ddf19347
2 changed files with 42 additions and 0 deletions
30
projects/github.com/terraform-linters/tflint/package.yml
Normal file
30
projects/github.com/terraform-linters/tflint/package.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/terraform-linters/tflint/archive/refs/tags/v{{ version }}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: terraform-linters/tflint
|
||||||
|
strip: /v/
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/tflint
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
go.dev: '*'
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
script: |
|
||||||
|
export GOPATH="$PWD/build"
|
||||||
|
mkdir -p dist
|
||||||
|
go build -v -ldflags="$LDFLAGS" -o dist/tflint
|
||||||
|
mkdir -p {{prefix}}/bin
|
||||||
|
mv dist/tflint {{prefix}}/bin/
|
||||||
|
env:
|
||||||
|
LDFLAGS:
|
||||||
|
[-s, -w]
|
||||||
|
|
||||||
|
test:
|
||||||
|
script: |
|
||||||
|
# tflint returns exitstatus: 0 (no issues), 2 (errors occured), 3 (no errors but issues found)
|
||||||
|
test "" = "$(tflint test.tf)"
|
||||||
|
tflint --version | grep {{version}}
|
12
projects/github.com/terraform-linters/tflint/test.tf
Normal file
12
projects/github.com/terraform-linters/tflint/test.tf
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
aws = {
|
||||||
|
source = "hashicorp/aws"
|
||||||
|
version = "~> 4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "aws" {
|
||||||
|
region = var.aws_region
|
||||||
|
}
|
Loading…
Reference in a new issue