-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
golangci-lint.rb
94 lines (85 loc) · 3.91 KB
/
golangci-lint.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class GolangciLint < Formula
desc "Fast linters runner for Go."
homepage "https://golangci.com"
version "1.47.2"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/golangci/golangci-lint/releases/download/v1.47.2/golangci-lint-1.47.2-darwin-arm64.tar.gz"
sha256 "1e212e6fd5aac71720cd62a9afecb1750098af9ce1c1ab84d7889db37b1be20d"
def install
bin.install "golangci-lint"
output = Utils.popen_read("#{bin}/golangci-lint completion bash")
(bash_completion/"golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion zsh")
(zsh_completion/"_golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion fish")
(fish_completion/"golangci-lint.fish").write output
prefix.install_metafiles
end
end
if Hardware::CPU.intel?
url "https://github.com/golangci/golangci-lint/releases/download/v1.47.2/golangci-lint-1.47.2-darwin-amd64.tar.gz"
sha256 "72351b069e22e64a7e2a8e9484cdc696288ddf2267846f1a5f969808b4366d4f"
def install
bin.install "golangci-lint"
output = Utils.popen_read("#{bin}/golangci-lint completion bash")
(bash_completion/"golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion zsh")
(zsh_completion/"_golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion fish")
(fish_completion/"golangci-lint.fish").write output
prefix.install_metafiles
end
end
end
on_linux do
if Hardware::CPU.intel?
url "https://github.com/golangci/golangci-lint/releases/download/v1.47.2/golangci-lint-1.47.2-linux-amd64.tar.gz"
sha256 "1edb3ac11c3928448cae9d7f6062535f6d35f55aa64cd3a3c2f9b26680da6c56"
def install
bin.install "golangci-lint"
output = Utils.popen_read("#{bin}/golangci-lint completion bash")
(bash_completion/"golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion zsh")
(zsh_completion/"_golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion fish")
(fish_completion/"golangci-lint.fish").write output
prefix.install_metafiles
end
end
if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit?
url "https://github.com/golangci/golangci-lint/releases/download/v1.47.2/golangci-lint-1.47.2-linux-armv6.tar.gz"
sha256 "ae9b2611b51ceca86d7c41b2ad7ebc9f42a4b2bf8c0dd64ea9e7cc2ec4cd9a96"
def install
bin.install "golangci-lint"
output = Utils.popen_read("#{bin}/golangci-lint completion bash")
(bash_completion/"golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion zsh")
(zsh_completion/"_golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion fish")
(fish_completion/"golangci-lint.fish").write output
prefix.install_metafiles
end
end
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/golangci/golangci-lint/releases/download/v1.47.2/golangci-lint-1.47.2-linux-arm64.tar.gz"
sha256 "1a67aff09ca9f5b3dd713d825b872aa7f87f3d9e8142dfb530b527ea07f4d3eb"
def install
bin.install "golangci-lint"
output = Utils.popen_read("#{bin}/golangci-lint completion bash")
(bash_completion/"golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion zsh")
(zsh_completion/"_golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion fish")
(fish_completion/"golangci-lint.fish").write output
prefix.install_metafiles
end
end
end
test do
system "#{bin}/golangci-lint --version"
end
end