<commit_before>class Flow < Formula
  desc "Static type checker for JavaScript"
  homepage "http://flowtype.org/"
  url "https://github.com/facebook/flow/archive/v0.25.0.tar.gz"
  sha256 "7144ecef267fb629051f6a941652cd6cb26793b9d91213eca0f9ef31a466cffa"
  head "https://github.com/facebook/flow.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "8f23f7c40cf32fc7b627108ecf99081311b64ae3fcd20b0acaea7f29077df135" => :el_capitan
    sha256 "6f73be034ece45a02e20395760bbd328229da0547102ebf89ea4172851639cde" => :yosemite
    sha256 "a281a81f5712f7d91aa90c2b60a3908c1b61b2437f5f08aaa13d488fe47b3409" => :mavericks
  end

  depends_on "ocaml" => :build
  depends_on "ocamlbuild" => :build

  def install
    system "make"
    bin.install "bin/flow"

    bash_completion.install "resources/shell/bash-completion" => "flow-completion.bash"
    zsh_completion.install_symlink bash_completion/"flow-completion.bash" => "_flow"
  end

  test do
    system "#{bin}/flow", "init", testpath
    (testpath/"test.js").write <<-EOS.undent
      /* @flow */
      var x: string = 123;
    EOS
    expected = /number\nThis type is incompatible with\n.*string\n\nFound 1 error/
    assert_match expected, shell_output("#{bin}/flow check --old-output-format #{testpath}", 2)
  end<commit_msg>flow 0.26.0<commit_after>class Flow < Formula
  desc "Static type checker for JavaScript"
  homepage "http://flowtype.org/"
  url "https://github.com/facebook/flow/archive/v0.26.0.tar.gz"
  sha256 "7813c98f7509d89e5a187df4252dbf8e6c429b1d711e10156eccb1ac793fb571"
  head "https://github.com/facebook/flow.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "8f23f7c40cf32fc7b627108ecf99081311b64ae3fcd20b0acaea7f29077df135" => :el_capitan
    sha256 "6f73be034ece45a02e20395760bbd328229da0547102ebf89ea4172851639cde" => :yosemite
    sha256 "a281a81f5712f7d91aa90c2b60a3908c1b61b2437f5f08aaa13d488fe47b3409" => :mavericks
  end

  depends_on "ocaml" => :build
  depends_on "ocamlbuild" => :build

  def install
    system "make"
    bin.install "bin/flow"

    bash_completion.install "resources/shell/bash-completion" => "flow-completion.bash"
    zsh_completion.install_symlink bash_completion/"flow-completion.bash" => "_flow"
  end

  test do
    system "#{bin}/flow", "init", testpath
    (testpath/"test.js").write <<-EOS.undent
      /* @flow */
      var x: string = 123;
    EOS
    expected = /number\nThis type is incompatible with\n.*string\n\nFound 1 error/
    assert_match expected, shell_output("#{bin}/flow check --old-output-format #{testpath}", 2)
  end
{'fraction_non_alphanumeric': 0.11544461778471139, 'fraction_numerical': 0.14508580343213728, 'mean_word_length': 4.321576763485477, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1822389', 'n_tokens_mistral': 1223, 'n_tokens_neox': 995, 'n_words': 160}