2011-12-25 18:40:10 +00:00
|
|
|
class Findbugs < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Find bugs in Java programs through static analysis"
|
2015-01-30 09:21:53 +00:00
|
|
|
homepage "http://findbugs.sourceforge.net/index.html"
|
2015-05-30 02:56:27 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/findbugs/findbugs/3.0.1/findbugs-3.0.1.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "e80e0da0c213a27504ef3188ef25f107651700ffc66433eac6a7454bbe336419"
|
2011-12-25 18:40:10 +00:00
|
|
|
|
2015-01-30 09:21:53 +00:00
|
|
|
conflicts_with "fb-client",
|
2013-08-17 17:20:11 +00:00
|
|
|
:because => "findbugs and fb-client both install a `fb` binary"
|
|
|
|
|
2015-01-30 09:21:53 +00:00
|
|
|
depends_on :java => "1.7+"
|
2014-08-13 20:22:16 +00:00
|
|
|
|
2011-12-25 18:40:10 +00:00
|
|
|
def install
|
|
|
|
# Remove windows files
|
|
|
|
rm_f Dir["bin/*.bat"]
|
2012-11-11 19:20:09 +00:00
|
|
|
prefix.install_metafiles
|
2015-01-30 09:21:53 +00:00
|
|
|
libexec.install Dir["*"]
|
2011-12-25 18:40:10 +00:00
|
|
|
|
2015-01-30 09:21:53 +00:00
|
|
|
bin.write_exec_script libexec/"bin/fb"
|
|
|
|
bin.write_exec_script libexec/"bin/findbugs"
|
2011-12-25 18:40:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Some tools might refer findbugs by env variable.
|
|
|
|
After installation, set $FINDBUGS_HOME in your profile:
|
|
|
|
export FINDBUGS_HOME=#{libexec}
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2011-12-25 18:40:10 +00:00
|
|
|
system "#{bin}/fb"
|
|
|
|
end
|
|
|
|
end
|