detekt 1.11.0

update test and use default config

remove uesless output

Closes #59624.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Rui Chen 2020-08-13 19:34:11 -04:00 committed by BrewTestBot
parent 4a992dc515
commit 52f0a7bd60
1 changed files with 7 additions and 9 deletions

View File

@ -1,10 +1,9 @@
class Detekt < Formula
desc "Static code analysis for Kotlin"
homepage "https://github.com/detekt/detekt"
url "https://jcenter.bintray.com/io/gitlab/arturbosch/detekt/detekt-cli/1.10.0/detekt-cli-1.10.0-all.jar"
sha256 "bde5df05598fab5fe6c8f636a2cacce42440591985b744bc77ca519b25d20b9d"
url "https://jcenter.bintray.com/io/gitlab/arturbosch/detekt/detekt-cli/1.11.0/detekt-cli-1.11.0-all.jar"
sha256 "f51f355aa1b69d3e14ac93c95af4de162bdf489e74a9d2dbb7870a11ff4d1159"
license "Apache-2.0"
revision 1
bottle :unneeded
@ -16,17 +15,16 @@ class Detekt < Formula
end
test do
# generate default config for testing
system bin/"detekt", "--generate-config"
assert_match "empty-blocks:", File.read(testpath/"detekt.yml")
(testpath/"input.kt").write <<~EOS
fun main() {
}
EOS
(testpath/"detekt.yml").write <<~EOS
empty-blocks:
EmptyFunctionBlock:
active: true
EOS
system bin/"detekt", "--input", "input.kt", "--report", "txt:output.txt", "--config", "detekt.yml"
shell_output("#{bin}/detekt --input input.kt --report txt:output.txt --config #{testpath}/detekt.yml", 2)
assert_equal "EmptyFunctionBlock", shell_output("cat output.txt").slice(/\w+/)
end
end