Repository navigation
Conversation
shfmt formats Bats test files using its bats dialect, which it selects from the .bats name this builtin passes with -filename.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The focused metadata change correctly enables existing filename-based Bats formatting behavior.
0 open findings
What changed in this PR
Adds Bats filetype support to the existing shfmt formatter.
Changes:
- Enables
shfmtforbatsbuffers.
| File | Description |
|---|---|
lua/null-ls/builtins/formatting/shfmt.lua |
Adds bats to supported filetypes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jfly
left a comment
There was a problem hiding this comment.
LGTM, but please mark as draft until vim/vim#21516 lands. Unless there's some value to this even if vim/vim#21516 never lands?
What does this PR do?
Adds the
batsfiletype to shfmt. I've proposed giving*.batsfiles their ownbatsfiletype in Vim (vim/vim#21516) rather thansh; if that lands and reaches Neovim, shfmt would stop running on Bats files without this. shfmt already formats them with its bats dialect, chosen from the.batsname passed via-filename.This is part of a broader effort to improve Bats support across editors. I maintain tree-sitter-bats.
Checklist
understand it should be contributed to
nvimtools/none-ls-extras.nvim
instead
batsbuffer through none-ls.