homebrew-core/Formula/sonar-scanner.rb

24 lines
892 B
Ruby

class SonarScanner < Formula
desc "Launcher to analyze a project with SonarQube"
homepage "https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner"
url "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216.zip"
sha256 "a271a933d14da6e8705d58996d30afd0b4afc93c0bfe957eb377bed808c4fa89"
license "LGPL-3.0-or-later"
head "https://github.com/SonarSource/sonar-scanner-cli.git"
bottle :unneeded
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
end
test do
assert_match version.to_s, shell_output("#{bin}/sonar-scanner --version")
end
end