Packages
A spellchecker for Elixir, made with Bun and cspell
Current section
Files
Jump to
Current section
Files
lib/mix/tasks/spellrider.check.ex
defmodule Mix.Tasks.Spellweaver.Check do
@moduledoc """
Check the spelling of the project using cspell.
"""
use Mix.Task
@impl Mix.Task
def run(_args) do
config = [
args: ~w(),
cd: Path.expand("."),
env: %{}
]
Application.put_env(:bun, :spellweaver, config)
:ok = Bun.install()
with 0 <- Bun.run(:spellweaver, ~w(add cspell)),
0 <- Bun.run(:spellweaver, ~w(run cspell . --quiet)) do
Mix.shell().info("Spellcheck passed.")
else
status ->
Mix.shell().error("Spellcheck failed.")
System.halt(status)
end
end
end