Skip to content

Commit 0076fc4

Browse files
BrewTestBotchenrui333
authored andcommitted
dotenv-linter 4.0.0
dotenv-linter: update build/test Signed-off-by: Rui Chen <[email protected]>
1 parent 7d4db12 commit 0076fc4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Formula/d/dotenv-linter.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class DotenvLinter < Formula
22
desc "Lightning-fast linter for .env files written in Rust"
33
homepage "https://dotenv-linter.github.io"
4-
url "https://github.com/dotenv-linter/dotenv-linter/archive/refs/tags/v3.3.0.tar.gz"
5-
sha256 "ffcd2f0d5bb40a19ea747ad7786fea796a7454f51e6da8f37fec572da8ae3c5f"
4+
url "https://github.com/dotenv-linter/dotenv-linter/archive/refs/tags/v4.0.0.tar.gz"
5+
sha256 "c10f63e84a877b630986a59680df20ee3f49ae3f89daa8d7e65f427d31b13a32"
66
license "MIT"
77
head "https://github.com/dotenv-linter/dotenv-linter.git", branch: "master"
88

@@ -25,25 +25,24 @@ class DotenvLinter < Formula
2525
depends_on "rust" => :build
2626

2727
def install
28-
system "cargo", "install", *std_cargo_args
28+
system "cargo", "install", *std_cargo_args(path: "dotenv-cli")
2929
end
3030

3131
test do
32-
checks = shell_output("#{bin}/dotenv-linter list").split("\n")
33-
assert_includes checks, "DuplicatedKey"
34-
assert_includes checks, "UnorderedKey"
35-
assert_includes checks, "LeadingCharacter"
32+
assert_match version.to_s, shell_output("#{bin}/dotenv-linter --version")
3633

3734
(testpath/".env").write <<~EOS
3835
FOO=bar
3936
FOO=bar
4037
BAR=foo
4138
EOS
39+
4240
(testpath/".env.test").write <<~EOS
4341
1FOO=bar
4442
_FOO=bar
4543
EOS
46-
output = shell_output(bin/"dotenv-linter", 1)
44+
45+
output = shell_output("#{bin}/dotenv-linter check .env .env.test", 1)
4746
assert_match(/\.env:2\s+DuplicatedKey/, output)
4847
assert_match(/\.env:3\s+UnorderedKey/, output)
4948
assert_match(/\.env.test:1\s+LeadingCharacter/, output)

0 commit comments

Comments
 (0)