Skip to content

Commit bdecb85

Browse files
authored
Merge pull request #250061 from mcookly/add-fennel-ls
fennel-ls 0.2.1 (new formula)
2 parents 2703fb5 + 88f2ea4 commit bdecb85

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Formula/f/fennel-ls.rb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class FennelLs < Formula
2+
desc "Language Server for Fennel"
3+
homepage "https://git.sr.ht/~xerool/fennel-ls/"
4+
url "https://git.sr.ht/~xerool/fennel-ls/archive/0.2.1.tar.gz"
5+
sha256 "564c9db4565decad5495e6112e025baeeb41000b03b82f237854e485f814f74b"
6+
license "MIT"
7+
8+
bottle do
9+
sha256 cellar: :any_skip_relocation, all: "07813eac3528489a90fd5ac7c0d3e56210f6783021a4e9abb51b069edf456515"
10+
end
11+
12+
depends_on "pandoc" => :build
13+
depends_on "lua"
14+
15+
def install
16+
# upstream has bump the version to 0.2.2-dev, https://git.sr.ht/~xerool/fennel-ls/commit/6826c7584d35660aac0fc52f3db7a13c52542f3b
17+
# upstream bug report, https://todo.sr.ht/~xerool/fennel-ls/87
18+
inreplace "src/fennel-ls/utils.fnl", "0.2.0", version.to_s
19+
20+
system "make"
21+
system "make", "PREFIX=#{prefix}", "install"
22+
end
23+
24+
test do
25+
assert_match version.to_s, shell_output("#{bin}/fennel-ls --version")
26+
27+
(testpath/"test.fnl").write <<~FENNEL
28+
{ foo }
29+
FENNEL
30+
31+
expected = "test.fnl:1:6: error: expected even number of values in table literal"
32+
assert_match expected, shell_output("#{bin}/fennel-ls --lint test.fnl 2>&1", 1)
33+
end
34+
end

0 commit comments

Comments
 (0)