Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix The Justfile Lints #3536

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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