Skip to content

Conversation

@barrettruth
Copy link
Contributor

@barrettruth barrettruth commented Feb 9, 2026

Depends on #80

Problem

checkmake and prettierd used custom fn handlers to spawn processes
manually, duplicating what guard.nvim's standard cmd/args/parse
pipeline already does. This prevented their tests from using the shared
run_lint/run_fmt helpers.

Solution

Replace fn with standard config fields (cmd, args, fname,
stdin) and update tests to use run_lint and run_fmt.

Create wrapper run_lint_fn for the non-standard configs that mocks the coroutines and polls with vim.wait()

Problem: most formatters and linters in guard-collection had no test
coverage. The csharpier binary was renamed in v1.0+ and ruff's -e flag
was deprecated in favor of the check subcommand.

Solution: add 42 test files covering every remaining tool, fix the
csharpier and ruff definitions, extend the install script with gz/jar
archive types, add 6 new CI jobs (dotnet, ruby, clojure, elixir, nix,
swift), and expand existing jobs with newly tested tools.
Problem: the -X theirs merge strategy replaced the full test/all-tools
CI config with the smaller fix/broken-configs version, losing install
entries for dart, fish_indent, google-java-format, pg_format, tombi,
typos, typstyle, xmllint, and zigfmt.

Solution: restore binary.txt, ci.yaml, and install script from the
pre-merge test/all-tools state which already had all entries.
Problem: every test job repeated the same 5 steps for neovim, lua,
luarocks, busted/nlua, and guard.nvim clone — 175 lines of duplication
across 15 jobs.

Solution: extract into .github/actions/test-setup/action.yml and
replace with a single `uses: ./.github/actions/test-setup` per job.
Problem: rebase picked up old test versions that manually construct
commands instead of using the config-driven helpers, defeating the
purpose of testing the actual tool definitions.

Solution: replace all 14 affected test files with the upstream/main
versions that use run_lint/run_fmt. Add buf lint test using run_lint.
Problem: checkmake and prettierd used custom fn handlers to spawn
processes manually, duplicating what guard.nvim's standard cmd/args/parse
pipeline already does. This prevented their tests from using the shared
run_lint/run_fmt helpers.

Solution: replace fn with cmd/args/fname fields. Update tests to use
run_lint and run_fmt instead of manual vim.system calls.
Problem: cljfmt required a dedicated CI job with Java, Clojure CLI, a
hand-rolled wrapper script, and dep pre-warming. The binary job also had
an inline apt-get install command inconsistent with other tool lists.

Solution: switch cljfmt to the standalone GraalVM binary from GitHub
releases, move its test into test/binary/, delete the test-clojure job,
and extract the binary job's apt packages into binary-apt.txt.
Problem: cpplint and zsh tests bypassed the fn config entirely by
manually constructing vim.system calls, so drift between the test and
the actual config could go undetected.

Solution: add run_lint_fn helper that wraps the fn call in a coroutine
and pumps the event loop via vim.wait, then update cpplint and zsh
tests to use it.
@barrettruth barrettruth marked this pull request as ready for review February 9, 2026 19:47
@xiaoshihou514
Copy link
Member

I will review after the dependent pr is merged, the diff is to big rn

@barrettruth
Copy link
Contributor Author

R4R @xiaoshihou514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants