<commit_before>require "language/node"

class YamlLanguageServer < Formula
  desc "Language Server for Yaml Files"
  homepage "https://github.com/redhat-developer/yaml-language-server"
  url "https://registry.npmjs.org/yaml-language-server/-/yaml-language-server-1.3.0.tgz"
  sha256 "687fdd30a31dbb792dd5d31acfadf1a72058a4afdcb72a79b468ef512a11d19b"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "9263e1c32411bccec08e034997088e8911139704992e5eb427992f1bfdb3198c"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "9263e1c32411bccec08e034997088e8911139704992e5eb427992f1bfdb3198c"
    sha256 cellar: :any_skip_relocation, monterey:       "47dccc5d1968883137593117fc16944ae29edb65ffce2ef0782a9de2526a56f4"
    sha256 cellar: :any_skip_relocation, big_sur:        "47dccc5d1968883137593117fc16944ae29edb65ffce2ef0782a9de2526a56f4"
    sha256 cellar: :any_skip_relocation, catalina:       "47dccc5d1968883137593117fc16944ae29edb65ffce2ef0782a9de2526a56f4"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "9263e1c32411bccec08e034997088e8911139704992e5eb427992f1bfdb3198c"
  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
    require "open3"

    json = <<~JSON
      {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "initialize",
        "params": {
          "rootUri": null,
          "capabilities": {}<commit_msg>yaml-language-server: update 1.3.0 bottle.<commit_after>require "language/node"

class YamlLanguageServer < Formula
  desc "Language Server for Yaml Files"
  homepage "https://github.com/redhat-developer/yaml-language-server"
  url "https://registry.npmjs.org/yaml-language-server/-/yaml-language-server-1.3.0.tgz"
  sha256 "687fdd30a31dbb792dd5d31acfadf1a72058a4afdcb72a79b468ef512a11d19b"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "76bc2f0f7e22eebe4af0100370afe5f521513fb1f40943675bcf96e567212737"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "76bc2f0f7e22eebe4af0100370afe5f521513fb1f40943675bcf96e567212737"
    sha256 cellar: :any_skip_relocation, monterey:       "edfc7608ff4d55596c1b65fef083bd5b2c65e45a61ec3361a0d7a4f178927a97"
    sha256 cellar: :any_skip_relocation, big_sur:        "edfc7608ff4d55596c1b65fef083bd5b2c65e45a61ec3361a0d7a4f178927a97"
    sha256 cellar: :any_skip_relocation, catalina:       "edfc7608ff4d55596c1b65fef083bd5b2c65e45a61ec3361a0d7a4f178927a97"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "76bc2f0f7e22eebe4af0100370afe5f521513fb1f40943675bcf96e567212737"
  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
    require "open3"

    json = <<~JSON
      {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "initialize",
        "params": {
          "rootUri": null,
          "capabilities": {}
{'fraction_non_alphanumeric': 0.09414841451454724, 'fraction_numerical': 0.21150702844066688, 'mean_word_length': 4.762711864406779, 'pattern_counts': {'":': 12, '<': 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': '903215', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1264, 'n_words': 161}