<commit_before>class Gitleaks < Formula
  desc "Audit git repos for secrets"
  homepage "https://github.com/zricethezav/gitleaks"
  url "https://github.com/zricethezav/gitleaks/archive/v7.5.0.tar.gz"
  sha256 "9b06dbec9d1bc220630bb85298158d8a54d4be6f068472a0b3a0cc7a89cdfec7"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "6bbdb1d03b712b5646cd6a642df17395cbfa6d3ede59e773fca847eb331a9429"
    sha256 cellar: :any_skip_relocation, big_sur:       "e2b4b0a51b2570e73336ab89d51f40f962a801a663795e73feeb19e90ed54e56"
    sha256 cellar: :any_skip_relocation, catalina:      "22f51a910f778865734a9a4068d9cda3f53beb23cf319cec5fa1c43e1e1f5ed5"
    sha256 cellar: :any_skip_relocation, mojave:        "b1686d4627cf6a2ca03a00b92584a5289120ddc20a8be31c72e4a8c548e7a432"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "54751f444c9e1cfca69bcae7fa0e6958c9636fe261cee151f00a68fa26f219fd"
  end

  depends_on "go" => :build

  def install
    system "go", "build", "-ldflags", "-X github.com/zricethezav/gitleaks/v#{version.major}/version.Version=#{version}",
                 *std_go_args
  end

  test do
    output = shell_output("#{bin}/gitleaks -r https://github.com/gitleakstest/emptyrepo.git 2>&1", 1)
    assert_match "level=info msg=\"cloning... https://github.com/gitleakstest/emptyrepo.git\"", output
    assert_match "level=error msg=\"remote repository is empty\"", output

    assert_equal version, shell_output("#{bin}/gitleaks --version")
  end
end
<commit_msg>gitleaks 7.6.0<commit_after>class Gitleaks < Formula
  desc "Audit git repos for secrets"
  homepage "https://github.com/zricethezav/gitleaks"
  url "https://github.com/zricethezav/gitleaks/archive/v7.6.0.tar.gz"
  sha256 "922af2a6f3945954aacdf61919508d360685ee6fa165eab5070009ca9dcd523f"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "6bbdb1d03b712b5646cd6a642df17395cbfa6d3ede59e773fca847eb331a9429"
    sha256 cellar: :any_skip_relocation, big_sur:       "e2b4b0a51b2570e73336ab89d51f40f962a801a663795e73feeb19e90ed54e56"
    sha256 cellar: :any_skip_relocation, catalina:      "22f51a910f778865734a9a4068d9cda3f53beb23cf319cec5fa1c43e1e1f5ed5"
    sha256 cellar: :any_skip_relocation, mojave:        "b1686d4627cf6a2ca03a00b92584a5289120ddc20a8be31c72e4a8c548e7a432"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "54751f444c9e1cfca69bcae7fa0e6958c9636fe261cee151f00a68fa26f219fd"
  end

  depends_on "go" => :build

  def install
    system "go", "build", "-ldflags", "-X github.com/zricethezav/gitleaks/v#{version.major}/version.Version=#{version}",
                 *std_go_args
  end

  test do
    output = shell_output("#{bin}/gitleaks -r https://github.com/gitleakstest/emptyrepo.git 2>&1", 1)
    assert_match "level=info msg=\"cloning... https://github.com/gitleakstest/emptyrepo.git\"", output
    assert_match "level=error msg=\"remote repository is empty\"", output

    assert_equal version, shell_output("#{bin}/gitleaks --version")
  end
end

{'fraction_non_alphanumeric': 0.10341398740470666, 'fraction_numerical': 0.17666556181637388, 'mean_word_length': 5.209876543209877, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 8, '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': '3349570', 'n_tokens_mistral': 1545, 'n_tokens_neox': 1267, 'n_words': 169}