<commit_before>class Dfmt < Formula
  desc "Formatter for D source code"
  homepage "https://github.com/dlang-community/dfmt"
  url "https://github.com/dlang-community/dfmt.git",
      tag:      "v0.14.2",
      revision: "6a24f0dc7c490f4cb06cdc9d21b841bee84615f4"
  license "BSL-1.0"
  head "https://github.com/dlang-community/dfmt.git", branch: "v0.x.x"

  bottle do
    sha256 cellar: :any_skip_relocation, monterey:     "da0e960bd1741a529663f4b7c3fcd406f77a0a9b75d99ada5f9c7e782df3acaa"
    sha256 cellar: :any_skip_relocation, big_sur:      "0f09cf9fb7712ebc83e152a9f91e8b1bb6999f08193e972fe1aff4d59086173e"
    sha256 cellar: :any_skip_relocation, catalina:     "2cb758724bd788db0b23c88e40855ffe8fe5f78e88d30f3913967d0a7358ad95"
    sha256 cellar: :any_skip_relocation, x86_64_linux: "43b3d9dbcf4f21e8cd20937505b13406b2643bba0f10c498b9046ad894e22966"
  end

  depends_on "dmd" => :build

  def install
    system "make"
    bin.install "bin/dfmt"
  end

  test do
    (testpath/"test.d").write <<~EOS
      import std.stdio; void main() { writeln("Hello, world without explicit compilations!"); }
    EOS

    expected = <<~EOS
      import std.stdio;

      void main()
      {
          writeln("Hello, world without explicit compilations!");
      }
    EOS

    system "#{bin}/dfmt", "-i", "test.d"

    assert_equal expected, (testpath/"test.d").read
  end
end
<commit_msg>dfmt: update 0.14.2 bottle.<commit_after>class Dfmt < Formula
  desc "Formatter for D source code"
  homepage "https://github.com/dlang-community/dfmt"
  url "https://github.com/dlang-community/dfmt.git",
      tag:      "v0.14.2",
      revision: "6a24f0dc7c490f4cb06cdc9d21b841bee84615f4"
  license "BSL-1.0"
  head "https://github.com/dlang-community/dfmt.git", branch: "v0.x.x"

  bottle do
    sha256 cellar: :any_skip_relocation, monterey:     "b6f7197f2f1580bff0f06ed086ca679c310d87d64ed506ce8deb89fd49a7d514"
    sha256 cellar: :any_skip_relocation, big_sur:      "e558a7feb8739e2064851d66769050b26b8bab8bf009356a773cda5a39e924e4"
    sha256 cellar: :any_skip_relocation, catalina:     "3b322f9dbfb2062678b18e6e53719204446315e2fc70a788759505cdc663b839"
    sha256 cellar: :any_skip_relocation, x86_64_linux: "852cdd41ee99f72be5b7e22af09e07a5da3457791016a78ec0038f3172c96120"
  end

  depends_on "dmd" => :build

  def install
    system "make"
    bin.install "bin/dfmt"
  end

  test do
    (testpath/"test.d").write <<~EOS
      import std.stdio; void main() { writeln("Hello, world without explicit compilations!"); }
    EOS

    expected = <<~EOS
      import std.stdio;

      void main()
      {
          writeln("Hello, world without explicit compilations!");
      }
    EOS

    system "#{bin}/dfmt", "-i", "test.d"

    assert_equal expected, (testpath/"test.d").read
  end
end

{'fraction_non_alphanumeric': 0.11071171818835371, 'fraction_numerical': 0.15348670021567218, 'mean_word_length': 3.7900172117039586, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, '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': '2171893', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1127, 'n_words': 185}