diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 260f5ef..acd0e68 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -43,6 +43,13 @@ jobs: steps: - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 + # Used by gleam format, mix format + # NOTE: should be first since it is sometimes crashes (?) + - uses: erlef/setup-beam@v1 + with: + otp-version: "26" + gleam-version: "1.0.0" + elixir-version: "1.16.1" # Used by ruff - uses: actions/setup-python@v5 with: @@ -56,12 +63,6 @@ jobs: # Used by zigfmt - uses: goto-bus-stop/setup-zig@v2 - uses: uncenter/setup-taplo@v1 - # Used by gleam format - - uses: erlef/setup-beam@v1 - with: - otp-version: "26" - gleam-version: "1.0.0" - elixir-version: "1.16.1" # Used go shfmt - uses: actions/setup-go@v5 with: @@ -100,6 +101,12 @@ jobs: - name: Validate mix format run: mix help format + - name: Install rubocop + run: gem install rubocop + + - name: Validate rubocop + run: rubocop --version + - name: Install stylua run: cargo install stylua diff --git a/README.md b/README.md index 916ced0..f00f810 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ mdsf init | Lua | `stylua` | | Nim | `nimpretty` | | Python | `ruff` | +| Ruby | `rubocop` | | Rust | `rustfmt` | | Shell | `shfmt` | | TOML | `taplo` | diff --git a/src/formatters/mix_format.rs b/src/formatters/mix_format.rs index 11ea115..9de1026 100644 --- a/src/formatters/mix_format.rs +++ b/src/formatters/mix_format.rs @@ -19,7 +19,7 @@ mod test_gleam_format { }; #[test] - fn it_should_format_gleam() { + fn it_should_format_elixir() { let input = " def add(a , b ) do a + b end diff --git a/src/formatters/rubocop.rs b/src/formatters/rubocop.rs index 5429812..de111aa 100644 --- a/src/formatters/rubocop.rs +++ b/src/formatters/rubocop.rs @@ -23,7 +23,7 @@ mod test_ruff { }; #[test] - fn it_should_format_rust() { + fn it_should_format_ruby() { let input = "def add( a , b ) return a + b end";