Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristramg committed Jan 4, 2019
1 parent 73474b7 commit 3b03333
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
build: ## Install or update dependencies and builds the project
cargo build

test: ## Run the tests
cargo test

lint: ## Checks the formatting
cargo fmt --all -- --check

clippy: ## Checks for code style improvements
cargo clippy -- -D warnings

clean: ## Remove the target directory
cargo clean

check: test lint clippy ## Runs all the tests and checks

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: build test lint clippy clean check help
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# transpo-rt
Simple API for public transport realtime data
Simple API for public transport realtime data

## Building

Expand All @@ -26,3 +26,12 @@ You can check the needed cli parameters with the `-h` option:
```
cargo run --release -- -h
```

## Developping

You can run all the tests (unit test, integration, clippy and fmt) with:
```
make check
```

It will save you some time for the code review and continous integration ;)

0 comments on commit 3b03333

Please sign in to comment.