<commit_before>require "language/node"

class BashLanguageServer < Formula
  desc "Language Server for Bash"
  homepage "https://github.com/bash-lsp/bash-language-server"
  url "https://registry.npmjs.org/bash-language-server/-/bash-language-server-3.0.0.tgz"
  sha256 "23a2a0f8b62a2192f001ab0811051b085c11de6203b8358417ade21c0083be7e"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "dfae8ee6fe44de4d1320b4eace28044287b4b712081786152550564701c0bae8"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "dfae8ee6fe44de4d1320b4eace28044287b4b712081786152550564701c0bae8"
    sha256 cellar: :any_skip_relocation, monterey:       "a311e22809e11f956962a5b627023fc25b423f1ae1b6ac77a39418b578e7438a"
    sha256 cellar: :any_skip_relocation, big_sur:        "a311e22809e11f956962a5b627023fc25b423f1ae1b6ac77a39418b578e7438a"
    sha256 cellar: :any_skip_relocation, catalina:       "a311e22809e11f956962a5b627023fc25b423f1ae1b6ac77a39418b578e7438a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "dfae8ee6fe44de4d1320b4eace28044287b4b712081786152550564701c0bae8"
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    json = <<~JSON
      {
        "jsonrpc": "2.0",<commit_msg>bash-language-server 3.0.2<commit_after>require "language/node"

class BashLanguageServer < Formula
  desc "Language Server for Bash"
  homepage "https://github.com/bash-lsp/bash-language-server"
  url "https://registry.npmjs.org/bash-language-server/-/bash-language-server-3.0.2.tgz"
  sha256 "73f9b31f4ce53b97668c6057a4efbb38653c4e930d6407e08dbd6747cb7dcccb"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "dfae8ee6fe44de4d1320b4eace28044287b4b712081786152550564701c0bae8"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "dfae8ee6fe44de4d1320b4eace28044287b4b712081786152550564701c0bae8"
    sha256 cellar: :any_skip_relocation, monterey:       "a311e22809e11f956962a5b627023fc25b423f1ae1b6ac77a39418b578e7438a"
    sha256 cellar: :any_skip_relocation, big_sur:        "a311e22809e11f956962a5b627023fc25b423f1ae1b6ac77a39418b578e7438a"
    sha256 cellar: :any_skip_relocation, catalina:       "a311e22809e11f956962a5b627023fc25b423f1ae1b6ac77a39418b578e7438a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "dfae8ee6fe44de4d1320b4eace28044287b4b712081786152550564701c0bae8"
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    json = <<~JSON
      {
        "jsonrpc": "2.0",
{'fraction_non_alphanumeric': 0.0866691149467499, 'fraction_numerical': 0.2478883584282042, 'mean_word_length': 5.742574257425742, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 3, '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': '947380', 'n_tokens_mistral': 1550, 'n_tokens_neox': 1171, 'n_words': 136}