# Development Commands for nvim-shellspec ## Quality Assurance & Linting Commands ### Primary Linting Command ```bash pre-commit run --all-files ``` This runs all configured linters and formatters including: - ShellCheck for shell scripts - shfmt for shell script formatting - yamllint for YAML files - markdownlint for Markdown files - Various pre-commit hooks ### Individual Linters ```bash # YAML linting yamllint . # Markdown linting (via npx) npx markdownlint-cli -c .markdownlint.json --fix README.md # Shell script linting shellcheck bin/shellspec-format # Shell script formatting shfmt -w bin/shellspec-format # Lua linting (if available) luacheck lua/shellspec/ ``` ## Code Formatting ### ShellSpec DSL Formatting ```bash # Using standalone formatter ./bin/shellspec-format file.spec.sh # Or in Neovim/Vim :ShellSpecFormat :ShellSpecFormatRange (for selected lines) ``` ### Testing New Lua Implementation (Neovim) ```lua -- Test in Neovim command line :lua require('shellspec').setup({ auto_format = true }) :lua require('shellspec').format_buffer() -- Health check :checkhealth shellspec ``` ## Development Testing ### Manual Plugin Testing ```bash # Create test file touch test_example.spec.sh # Test in Neovim nvim test_example.spec.sh # Verify filetype: :set filetype? # Test formatting: :ShellSpecFormat # Test health check: :checkhealth shellspec ``` ### HEREDOC and Comment Testing Create test content with: ```shellspec Describe "test" # Comment that should be indented It "should preserve HEREDOC" cat <