<commit_before>class Flow < Formula
  desc "Static type checker for JavaScript"
  homepage "https://flowtype.org/"
  url "https://github.com/facebook/flow/archive/v0.167.0.tar.gz"
  sha256 "48020fcdedf96f8fc5a150a0eb30625b005b1892425aa3c8fda0e2f38932ce05"
  license "MIT"
  head "https://github.com/facebook/flow.git"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "5a0e553dbb82d8538ad14948c169d01365f9706435f68a817f0af796e64ca5b1"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "ac6ea8b78b75b0cae21f4c85be0a03f8b7fdf71c900b6f9d3a5d60c4c3b3472d"
    sha256 cellar: :any_skip_relocation, monterey:       "16999a25c097ca51902f4b3dae1d8794614dd467bff651587a236d1ae57467c7"
    sha256 cellar: :any_skip_relocation, big_sur:        "b4b322618569984360ebf5608929663893de1a3fcf13b0c1ac10840bf3b6fd19"
    sha256 cellar: :any_skip_relocation, catalina:       "5fe9f7a34845a6c40cd34c4c35410c43eeb2fc5116cf911d3e7b2870c01b7942"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "d48449a79662023ceb656bbf9496568760c18ef1b6bfe75aa3c537f2ed8d0b7f"
  end

  depends_on "ocaml" => :build
  depends_on "opam" => :build

  uses_from_macos "m4" => :build
  uses_from_macos "rsync" => :build
  uses_from_macos "unzip" => :build

  def install
    system "make", "all-homebrew"

    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<commit_msg>flow: update 0.167.0 bottle.<commit_after>class Flow < Formula
  desc "Static type checker for JavaScript"
  homepage "https://flowtype.org/"
  url "https://github.com/facebook/flow/archive/v0.167.0.tar.gz"
  sha256 "48020fcdedf96f8fc5a150a0eb30625b005b1892425aa3c8fda0e2f38932ce05"
  license "MIT"
  head "https://github.com/facebook/flow.git"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "836ae53a486c7dbba774f9e676612c83383ab93a402c01e0d8db21be441cd641"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "4e2d5fd677986900b67b5f3fa7d5442c4733b9415bf7651af21426779b4823f2"
    sha256 cellar: :any_skip_relocation, monterey:       "231ead9fe663b8761739fb50bf3f803e4599f65cf5ac1cfd957f7efe18b0cc86"
    sha256 cellar: :any_skip_relocation, big_sur:        "323d3c1c9699c1297bc7428ce9006909d11353d41e4664bc49b0037f916e40de"
    sha256 cellar: :any_skip_relocation, catalina:       "3d87ad7fe2ff980c348a6af88c7e64b20a0315c9dd2746a372a49450e8cba669"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f5344ac0a47ed6a8395c23add388e88452ac7bb9b42b29bbdc7c524707c40e5a"
  end

  depends_on "ocaml" => :build
  depends_on "opam" => :build

  uses_from_macos "m4" => :build
  uses_from_macos "rsync" => :build
  uses_from_macos "unzip" => :build

  def install
    system "make", "all-homebrew"

    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
{'fraction_non_alphanumeric': 0.09588617383235386, 'fraction_numerical': 0.20043303433343643, 'mean_word_length': 5.559837728194726, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 6, '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': '7270319', 'n_tokens_mistral': 1732, 'n_tokens_neox': 1378, 'n_words': 180}