homebrew-core/Formula/checkstyle.rb
Victor Martinez 8dc451e3e2 Fixed several broken sourceforge.net download locations
Closes Homebrew/homebrew#20645.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-06-30 12:17:57 -07:00

21 lines
700 B
Ruby

require 'formula'
class Checkstyle < Formula
homepage 'http://checkstyle.sourceforge.net/'
url 'http://downloads.sourceforge.net/project/checkstyle/checkstyle/5.6/checkstyle-5.6-bin.tar.gz'
sha1 'cf08ac75aedddcd3a8d1f27fcbbb6095b0d1d5e3'
def install
libexec.install 'checkstyle-5.6-all.jar', 'sun_checks.xml'
bin.write_jar_script libexec/'checkstyle-5.6-all.jar', 'checkstyle'
end
test do
# Note this test "fails" because the audit has issues
# TODO - pipe through cat to ingore error code
(testpath/"Test.java").write <<-EOS.undent
public class Test{ }
EOS
system "#{bin}/checkstyle", "-c", "#{libexec}/sun_checks.xml", "-r", "Test.java"
end
end