-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sidhant Kohli <sidhant_kohli@intuit.com>
- Loading branch information
Sidhant Kohli
committed
Jul 23, 2024
1 parent
2c9ad0b
commit 243c3a1
Showing
6 changed files
with
73 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Description: Makefile for Rust projects | ||
|
||
# perform a cargo fmt on all directories containing a Cargo.toml file | ||
.PHONY: lint | ||
# find all directories containing Cargo.toml files | ||
DIRS := $(shell find . -type f -name Cargo.toml -exec dirname {} \; | sort -u) | ||
$(info Included directories: $(DIRS)) | ||
lint: | ||
@for dir in $(DIRS); do \ | ||
echo "Formatting code in $$dir"; \ | ||
cargo fmt --all --manifest-path "$$dir/Cargo.toml"; \ | ||
done | ||
|
||
# run cargo test on the repository root | ||
.PHONY: test | ||
test: | ||
cargo test --workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters