<commit_before>class Sqlc < Formula
  desc "Generate type safe Go from SQL"
  homepage "https://sqlc.dev/"
  url "https://github.com/kyleconroy/sqlc/archive/v1.8.0.tar.gz"
  sha256 "6374c213c0edce9a4f852ce6ef737784d1623189b724160e0429d84519f7744f"
  license "MIT"
  head "https://github.com/kyleconroy/sqlc.git"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "e87faf917d9893d189b07ba837fcd5b1ba692ffae7dec0cd6aff58ab6b340167"
    sha256 cellar: :any_skip_relocation, big_sur:       "7ba27e3130ae197f3c7d01eb621c0a348192a6c4e612412e4bd947486f5039c0"
    sha256 cellar: :any_skip_relocation, catalina:      "023ffd136b1d9e14e21b232f21a78d962f96b94aa84a8a0eb8fc78f94d121d19"
    sha256 cellar: :any_skip_relocation, mojave:        "c8bb56f206950c30257c404b0619f47486e768a199160652aa716553111e7c28"
  end

  depends_on "go" => :build

  def install
    system "go", "build", *std_go_args, "-ldflags", "-s -w", "./cmd/sqlc"
  end

  test do
    (testpath/"sqlc.json").write <<~SQLC
      {
        "version": "1",
        "packages": [
          {
            "name": "db",
            "path": ".",
            "queries": "query.sql",
            "schema": "query.sql",
            "engine": "postgresql"
          }
        ]
      }<commit_msg>sqlc: update 1.8.0 bottle.<commit_after>class Sqlc < Formula
  desc "Generate type safe Go from SQL"
  homepage "https://sqlc.dev/"
  url "https://github.com/kyleconroy/sqlc/archive/v1.8.0.tar.gz"
  sha256 "6374c213c0edce9a4f852ce6ef737784d1623189b724160e0429d84519f7744f"
  license "MIT"
  head "https://github.com/kyleconroy/sqlc.git"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "3fb59db86e0b0d220bdb41fffe9682f46c4660190b9281d172629dd4e491c1c8"
    sha256 cellar: :any_skip_relocation, big_sur:       "954bd99e88d993edcb1ad0d17c6219068d8f67cc1c83ec14109c5c38ce1597ca"
    sha256 cellar: :any_skip_relocation, catalina:      "6f3a224a2f222f69cc184770657b27e8690fb326818078e723ff08fadd27e695"
    sha256 cellar: :any_skip_relocation, mojave:        "a207d10bd585d8a3362e9e823127836a4358ad0b861ab091913288b65b7a8b76"
  end

  depends_on "go" => :build

  def install
    system "go", "build", *std_go_args, "-ldflags", "-s -w", "./cmd/sqlc"
  end

  test do
    (testpath/"sqlc.json").write <<~SQLC
      {
        "version": "1",
        "packages": [
          {
            "name": "db",
            "path": ".",
            "queries": "query.sql",
            "schema": "query.sql",
            "engine": "postgresql"
          }
        ]
      }
{'fraction_non_alphanumeric': 0.11815675462780623, 'fraction_numerical': 0.18747538400945254, 'mean_word_length': 3.184514003294893, 'pattern_counts': {'":': 14, '<': 9, '<?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': '6150510', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1064, 'n_words': 149}