From f2709051660a0196ca786928fc1afa6cef492fd4 Mon Sep 17 00:00:00 2001 From: Cheng Xu Date: Thu, 20 Feb 2025 18:56:40 -0800 Subject: [PATCH] cspell 8.17.4 (new formula) --- Formula/c/cspell.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Formula/c/cspell.rb diff --git a/Formula/c/cspell.rb b/Formula/c/cspell.rb new file mode 100644 index 0000000000000..15d7257acbf16 --- /dev/null +++ b/Formula/c/cspell.rb @@ -0,0 +1,21 @@ +class Cspell < Formula + desc "Spell checker for code" + homepage "https://cspell.org" + url "https://registry.npmjs.org/cspell/-/cspell-8.17.4.tgz" + sha256 "706660433488a9889c2b81e1a10c86a0595b742ccd4815077af749f3aaa70d61" + license "MIT" + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + # Skip linking cspell-esm binary, which is identical to cspell. + bin.install_symlink libexec/"bin/cspell" + end + + test do + (testpath/"test.rb").write("misspell_worrd = 1") + output = shell_output("#{bin}/cspell test.rb", 1) + assert_match "test.rb:1:10 - Unknown word (worrd)", output + end +end