Skip to content

0.0.7 — Bash and YAML formatting

Choose a tag to compare

@javanoo6 javanoo6 released this 27 Oct 08:58

Adds Bash/shell formatting and YAML formatting for both .yaml and .yml files.

  • Bundle IntelliJ's YAML and Shell Script plugins.
  • Bundle shfmt 3.14.1 for Linux and macOS on AMD64/ARM64, and Windows on AMD64. No separate shfmt installation or runtime download is needed.
  • Respect .editorconfig, including indentation and shell-specific settings, and the existing --editorconfig option for files outside the config root.
  • Support .sh, .bash, and shell-shebang files in one-shot and daemon modes.
  • Wait for shell formatting to finish before reporting success; invalid shell syntax returns an error and leaves that script unchanged.
  • Verify downloaded native binaries against pinned SHA-256 checksums at build time and include the shfmt BSD license.
java -jar formatter-cli-full.jar --format config.yaml config.yml script.sh

Shell formatting uses tabs by default. Set indent_style = space and indent_size = 2 in the appropriate .editorconfig section for spaces. shfmt detects the dialect from the filename and shebang; Bash-specific .sh files should use a Bash shebang or shell_variant = bash.

Download formatter-cli-full.jar and verify it against SHA256SUMS. JDK 21 is required.

Validation: clean Maven reactor build and 15 integration checks on Linux AMD64 with JDK 21, covering Python, Bash/shell, both YAML extensions, Java, JSON, Markdown, XML, EditorConfig, daemon reuse, mixed-language requests, heredocs, Bash arrays, executable-file permissions, and failed-request recovery. Also verified that a corrupted cached native binary causes the build to fail. macOS and Windows binaries are bundled but were not executed during this validation.

Includes the Python support from 0.0.6, now merged into master. Python import sorting and unused-import removal remain unsupported in the standalone temporary project.