homebrew-core/Formula/sonar-scanner.rb

28 lines
1.1 KiB
Ruby

class SonarScanner < Formula
desc "Launcher to analyze a project with SonarQube"
homepage "https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/"
url "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747.zip"
sha256 "8e116018669ac97cab0555d17145f6de9f0d8ab7a2521b378a19388d0625ec55"
license "LGPL-3.0-or-later"
head "https://github.com/SonarSource/sonar-scanner-cli.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, all: "a1de3bfacf212710b3308cddc9ba286b2a80b7553fbc26340add77caa8335906"
end
depends_on "openjdk@11"
def install
rm_rf Dir["bin/*.bat"]
libexec.install Dir["*"]
bin.install libexec/"bin/sonar-scanner"
etc.install libexec/"conf/sonar-scanner.properties"
ln_s etc/"sonar-scanner.properties", libexec/"conf/sonar-scanner.properties"
bin.env_script_all_files libexec/"bin/", SONAR_SCANNER_HOME: libexec, JAVA_HOME: Formula["openjdk@11"].opt_prefix
end
test do
assert_match version.to_s, shell_output("#{bin}/sonar-scanner --version")
end
end