Skip to content

Commit

Permalink
makefile: add new script for creating new solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
tednaaa committed Sep 2, 2024
1 parent ed005c7 commit 851ba1f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
test:
new-solution: check-lib
@cargo init --lib crates/$(lib)

test: check-lib
@cargo test -p $(lib) --lib -- --nocapture

lint:
cargo clippy --all-targets --all-features
@cargo clippy --all-targets --all-features


check-lib:
@if [ -z "$(lib)" ]; then \
echo "Error: 'lib' argument is required."; \
exit 1; \
fi

0 comments on commit 851ba1f

Please sign in to comment.