tflint 0.9.1 (new formula)
Add tflint formula to brew. Signed-off-by: Dylan Arbour <dylan.arbour@gmail.com> Closes #41937. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
81af3b8180
commit
a4fa8b3203
1 changed files with 31 additions and 0 deletions
31
Formula/tflint.rb
Normal file
31
Formula/tflint.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
class Tflint < Formula
|
||||
desc "Linter for Terraform files"
|
||||
homepage "https://github.com/wata727/tflint"
|
||||
url "https://github.com/wata727/tflint/archive/v0.9.1.tar.gz"
|
||||
sha256 "a4f9f845584c51b3d0db3d2ee9ab48435db52ade3ddde1a8689e2ad8cf9acdca"
|
||||
head "https://github.com/wata727/tflint.git"
|
||||
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
ENV["GO111MODULE"] = "on"
|
||||
|
||||
dir = buildpath/"src/github.com/wata727/tflint"
|
||||
dir.install buildpath.children
|
||||
|
||||
cd dir do
|
||||
system "go", "build", "-o", bin/"tflint"
|
||||
prefix.install_metafiles
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.tf").write <<~EOS
|
||||
provider "aws" {
|
||||
region = "${var.aws_region}"
|
||||
}
|
||||
EOS
|
||||
assert_match "Awesome! Your code is following the best practices :)", shell_output("#{bin}/tflint test.tf")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue