<commit_before>require 'formula'

class Checkstyle < Formula
  homepage 'http://checkstyle.sourceforge.net/'
  url 'http://sourceforge.net/projects/checkstyle/files/checkstyle/5.5/checkstyle-5.5-bin.tar.gz'
  md5 '0dd29971aa26d917d88c229182272056'

  def install
    # wrapper script
    (bin/'checkstyle').write <<-EOS.undent
      #! /usr/bin/env bash -e
      java -jar "#{libexec}/checkstyle-5.5-all.jar" "$@"
    EOS

    libexec.install 'checkstyle-5.5-all.jar', 'sun_checks.xml'
  end

  def test
    mktemp do
      # create test file for `brew test checkstyle`
      (Pathname.pwd/"Test.java").write <<-EOS.undent
        public class Test{
        }
      EOS
      system "#{bin}/checkstyle -c #{libexec}/sun_checks.xml -r Test.java"
    end
  end
end
<commit_msg>checkstyle - minor tweaks to test<commit_after>require 'formula'

class Checkstyle < Formula
  homepage 'http://checkstyle.sourceforge.net/'
  url 'http://sourceforge.net/projects/checkstyle/files/checkstyle/5.5/checkstyle-5.5-bin.tar.gz'
  md5 '0dd29971aa26d917d88c229182272056'

  def install
    # wrapper script
    (bin/'checkstyle').write <<-EOS.undent
      #! /usr/bin/env bash -e
      java -jar "#{libexec}/checkstyle-5.5-all.jar" "$@"
    EOS

    libexec.install 'checkstyle-5.5-all.jar', 'sun_checks.xml'
  end

  def test
    mktemp do
      # create test file
      (Pathname.pwd/"Test.java").write <<-EOS.undent
        public class Test{ }
      EOS
      system "#{bin}/checkstyle -c #{libexec}/sun_checks.xml -r Test.java"
    end
  end
end

{'fraction_non_alphanumeric': 0.14006514657980457, 'fraction_numerical': 0.04429967426710098, 'mean_word_length': 2.773955773955774, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5082360', 'n_tokens_mistral': 603, 'n_tokens_neox': 556, 'n_words': 108}