Skip to content

Commit

Permalink
Fix The Justfile Lints (#3536)
Browse files Browse the repository at this point in the history
* fix commands

* fix justfile commands, use just in the lint stage
  • Loading branch information
jparr721 authored Aug 6, 2024
1 parent 4b866a7 commit d4daf28
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,12 @@ jobs:
- name: Install Rust
uses: mkroening/rust-toolchain-toml@main

- name: Install Just
run: |
wget https://github.com/casey/just/releases/download/1.14.0/just-1.14.0-x86_64-unknown-linux-musl.tar.gz
tar -vxf just-1.14.0-x86_64-unknown-linux-musl.tar.gz just
sudo cp just /usr/bin/just
- name: Check rustfmt
run: cargo fmt --check
run: |
just ${{ matrix.just_variants }} fmt_check
1 change: 0 additions & 1 deletion crates/testing/tests/tests_1/quorum_vote_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,3 @@ async fn test_quorum_vote_task_incorrect_dependency() {
};
run_test![inputs, script].await;
}

7 changes: 4 additions & 3 deletions crates/testing/tests/tests_2/catchup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,10 @@ async fn test_all_restart() {
let mut catchup_nodes = vec![];
for i in 1..20 {
catchup_nodes.push(ChangeNode {
idx: i,
updown: UpDown::Restart,
})};
idx: i,
updown: UpDown::Restart,
})
}

metadata.timing_data = timing_data;
metadata.start_nodes = 20;
Expand Down
34 changes: 18 additions & 16 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,29 +186,31 @@ clippy:
echo clippy
cargo clippy --workspace --examples --bins --tests -- -D warnings

lint:
echo linting
cargo fmt --check
cargo clippy --workspace --examples --bins --tests -- -D warnings
clippy_dependency_tasks:
echo clippy release
cargo clippy --workspace --examples --bins --tests --features "dependency-tasks" -- -D warnings

lint_release:
echo linting
cargo fmt --check
clippy_release:
echo clippy release
cargo clippy --package hotshot --no-default-features --features="docs, doc-images" -- -D warnings

fmt:
echo Running cargo fmt
cargo fmt
cargo fmt -- crates/**/*.rs
cargo fmt -- crates/**/tests/**/**.rs

fmt_lint:
echo Formatting and linting
cargo fmt
cargo clippy --workspace --examples --bins --tests -- -D warnings
fmt_check:
echo Running cargo fmt --check
cargo fmt --check -- crates/**/*.rs
cargo fmt --check -- crates/**/tests/**/**.rs

fmt_lint_dependency_tasks:
echo Formatting and linting
cargo fmt
cargo clippy --workspace --examples --bins --tests --features "dependency-tasks" -- -D warnings
lint: clippy fmt_check

lint_release: clippy_release fmt_check

fmt_clippy: fmt clippy

fmt_clippy_dependency_tasks: fmt clippy_dependency_tasks

careful:
echo Careful-ing with tokio executor
Expand Down

0 comments on commit d4daf28

Please sign in to comment.