Skip to content

Commit

Permalink
ci: install rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
hougesen committed Mar 9, 2024
1 parent 267f92b commit 2ff53a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ mdsf init
| Lua | `stylua` |
| Nim | `nimpretty` |
| Python | `ruff` |
| Ruby | `rubocop` |
| Rust | `rustfmt` |
| Shell | `shfmt` |
| TOML | `taplo` |
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/mix_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/rubocop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 2ff53a2

Please sign in to comment.