b4701bb57c
Closes #47465. Signed-off-by: Alexander Bayandin <a.bayandin@gmail.com>
23 lines
600 B
Ruby
23 lines
600 B
Ruby
class Ktlint < Formula
|
|
desc "Anti-bikeshedding Kotlin linter with built-in formatter"
|
|
homepage "https://ktlint.github.io/"
|
|
url "https://github.com/pinterest/ktlint/releases/download/0.36.0/ktlint"
|
|
sha256 "a656342cfce5c1fa14f13353b84b1505581af246638eb970c919fb053e695d5e"
|
|
|
|
bottle :unneeded
|
|
|
|
def install
|
|
bin.install "ktlint"
|
|
end
|
|
|
|
test do
|
|
(testpath/"In.kt").write <<~EOS
|
|
fun main( )
|
|
EOS
|
|
(testpath/"Out.kt").write <<~EOS
|
|
fun main()
|
|
EOS
|
|
system bin/"ktlint", "-F", "In.kt"
|
|
assert_equal shell_output("cat In.kt"), shell_output("cat Out.kt")
|
|
end
|
|
end
|