24 lines
600 B
Ruby
24 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.32.0/ktlint"
|
||
|
sha256 "95d292cb45271c733640a3d24add7db4f9f2fac998fb5a15679e6da79fb04441"
|
||
|
|
||
|
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
|