<commit_before>class Shellharden < Formula
  desc "Bash syntax highlighter that encourages/fixes variables quoting"
  homepage "https://github.com/anordal/shellharden"
  url "https://github.com/anordal/shellharden/archive/v4.1.1.tar.gz"
  sha256 "7d7ac3443f35eb74abfc78fa67db2947d60b7d0782f225f55d6eefafcf294c7c"

  bottle do
    cellar :any_skip_relocation
    sha256 "7d3933bd529531a8d9060b49a68b99e08820dd1a9952f7cc046aafdb4ebc49d0" => :catalina
    sha256 "edca629536f1b38bfb473dd98b2259726dba51fc448ea4e59e7a15359bc99fc3" => :mojave
    sha256 "41e43c80d63fe7a33d3d9f06741db902c0ab6fc26ed9bc5037f30295d43c8360" => :high_sierra
    sha256 "78a7c2a75348c1746c0d658b6e1070a4277934d534137642caf84871ac467596" => :sierra
  end

  depends_on "rust" => :build

  def install
    system "cargo", "install", "--root", prefix, "--path", "."
  end

  test do
    (testpath/"script.sh").write <<~EOS
      dog="poodle"<commit_msg>shellharden: add --locked flag to cargo install<commit_after>class Shellharden < Formula
  desc "Bash syntax highlighter that encourages/fixes variables quoting"
  homepage "https://github.com/anordal/shellharden"
  url "https://github.com/anordal/shellharden/archive/v4.1.1.tar.gz"
  sha256 "7d7ac3443f35eb74abfc78fa67db2947d60b7d0782f225f55d6eefafcf294c7c"

  bottle do
    cellar :any_skip_relocation
    sha256 "7d3933bd529531a8d9060b49a68b99e08820dd1a9952f7cc046aafdb4ebc49d0" => :catalina
    sha256 "edca629536f1b38bfb473dd98b2259726dba51fc448ea4e59e7a15359bc99fc3" => :mojave
    sha256 "41e43c80d63fe7a33d3d9f06741db902c0ab6fc26ed9bc5037f30295d43c8360" => :high_sierra
    sha256 "78a7c2a75348c1746c0d658b6e1070a4277934d534137642caf84871ac467596" => :sierra
  end

  depends_on "rust" => :build

  def install
    system "cargo", "install", "--locked", "--root", prefix, "--path", "."
  end

  test do
    (testpath/"script.sh").write <<~EOS
      dog="poodle"
{'fraction_non_alphanumeric': 0.09936575052854123, 'fraction_numerical': 0.23361522198731502, 'mean_word_length': 5.482876712328767, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '5072457', 'n_tokens_mistral': 1052, 'n_tokens_neox': 825, 'n_words': 108}