Skip to content

Commit

Permalink
✨ Add lints for all targets in justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Dec 21, 2023
1 parent 176c498 commit e574057
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/common/src/asterisc/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl BasicKernelInterface for AsteriscIO {
SyscallNumber::Write as usize,
fd as usize,
buf.as_ptr() as usize,
buf.len() as usize,
buf.len(),
) as RegisterSize)
}
}
Expand All @@ -43,7 +43,7 @@ impl BasicKernelInterface for AsteriscIO {
SyscallNumber::Read as usize,
fd as usize,
buf.as_ptr() as usize,
buf.len() as usize,
buf.len(),
) as RegisterSize)
}
}
Expand Down
28 changes: 25 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
set positional-arguments

# Lint the workspace for all available targets
lint: lint-native lint-cannon lint-asterisc

# Lint the workspace
lint:
cargo +nightly fmt --all && cargo +nightly clippy --all --all-features --all-targets -- -D warnings
lint-native:
cargo +nightly fmt --all
cargo +nightly clippy --workspace --all --all-features --all-targets -- -D warnings

# Lint the workspace (mips arch)
lint-cannon:
docker run \
--rm \
--platform linux/amd64 \
-v `pwd`/:/workdir \
-w="/workdir" \
cannon-pipeline:latest cargo +nightly clippy --workspace --all --all-features --target /mips-unknown-none.json -Zbuild-std -- -D warnings

# Lint the workspace (risc-v arch)
lint-asterisc:
docker run \
--rm \
--platform linux/amd64 \
-v `pwd`/:/workdir \
-w="/workdir" \
asterisc-pipeline:latest cargo +nightly clippy --workspace --all --all-features --target riscv64gc-unknown-linux-gnu -Zbuild-std -- -D warnings

# Build the workspace for all available targets
build-all: build-native build-cannon build-asterisc
build: build-native build-cannon build-asterisc

# Build for the native target
build-native *args='':
Expand Down

0 comments on commit e574057

Please sign in to comment.