Skip to content

fix: correct broken tool definitions#79

Merged
xiaoshihou514 merged 2 commits intonvimdev:mainfrom
barrettruth:fix/broken-configs
Feb 9, 2026
Merged

fix: correct broken tool definitions#79
xiaoshihou514 merged 2 commits intonvimdev:mainfrom
barrettruth:fix/broken-configs

Conversation

@barrettruth
Copy link
Contributor

@barrettruth barrettruth commented Feb 9, 2026

Problem

Many tool definitions produce invalid commands when invoked, such as:

  • pylint, shellcheck, and rubocop are missing fname = true
  • hadolint needs an explicit - to read stdin
  • ruff, ruff_fix linter uses thedeprecated -e flag and is missing the check subcommand
  • buf is configured for stdin, which it doesn't support (MY FAULT)
  • csharpier still references the old dotnet-csharpier binary and is missing the format subcommand

Solution

Fix all configs and add a test for each one that exercises the
definition through run_fmt/run_lint as you suggested, so the configs are actually
proven to work. The test helper gains opts (cwd/tmpdir) and
assert_diag to support this. Finally, CI picks up pylint, hadolint,
shellcheck, dart, and two new jobs for dotnet and ruby.

This is a prerequisite for #76. I figured that it'd be better to fix these FIRST then add the rest of the tests to make it clear which linters/formatters are presently BROKEN vs. which we're just adding tests for.

@barrettruth barrettruth force-pushed the fix/broken-configs branch 3 times, most recently from 4fb30fd to d0fa7a6 Compare February 9, 2026 05:30
Problem: several formatter and linter configs produced invalid commands
when invoked by guard.nvim. pylint, shellcheck, and rubocop were missing
fname=true so guard never appended the required filename argument.
hadolint lacked the '-' arg needed to read stdin. ruff linter used the
deprecated -e flag and was missing the 'check' subcommand. buf format
was configured for stdin which it does not support. csharpier referenced
the old dotnet-csharpier binary renamed in v1.0+. ruff_fix was missing
the 'check' subcommand.

Solution: add fname=true to pylint, shellcheck, and rubocop linters.
Add '-' to hadolint args. Replace ruff linter's -e with check
subcommand. Change buf from stdin to fname with -w flag. Update
csharpier cmd and args for v1.0+. Add check to ruff_fix args.
@barrettruth barrettruth force-pushed the fix/broken-configs branch 3 times, most recently from ca21a43 to bdfcf86 Compare February 9, 2026 06:14
Problem: the config fixes in the previous commit had no test coverage
proving the definitions produce valid commands.

Solution: add opts (cwd, tmpdir) and assert_diag to the test helper.
Add tests for all 8 fixed tools using run_fmt/run_lint to exercise the
actual configs. Add pylint to pip.txt, hadolint to binary.txt,
shellcheck to the binary CI job, and new test-dotnet and test-ruby
CI jobs.
@xiaoshihou514
Copy link
Member

Looks reasonable, but all the problems I addressed before still holds

@xiaoshihou514 xiaoshihou514 merged commit 888962b into nvimdev:main Feb 9, 2026
10 checks passed
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