Closed TrueDoctor closed 4 years ago
You probably want to use cargo make check-format
. When having changes that violate the default codestyle, you get an error like this:
[nix-shell:~/Projects/ratatosk]$ cargo make check-format
[cargo-make] INFO - cargo make 0.27.0
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: check-format
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: init
[cargo-make] INFO - Running Task: workspace
[cargo-make] INFO - cargo make 0.27.0
[cargo-make] INFO - External file not found or is not a file, skipping.
[cargo-make] INFO - Project: rask-engine
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: check-format
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: init
[cargo-make] INFO - Running Task: check-format
[cargo-make] INFO - Execute Command: "cargo" "fmt" "--" "--check"
[cargo-make] INFO - Running Task: end
[cargo-make] INFO - Build Done in 0 seconds.
/home/ma27/Projects/ratatosk
[cargo-make] INFO - cargo make 0.27.0
[cargo-make] INFO - External file not found or is not a file, skipping.
[cargo-make] INFO - Project: rask-server
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: check-format
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: init
[cargo-make] INFO - Running Task: check-format
[cargo-make] INFO - Execute Command: "cargo" "fmt" "--" "--check"
[cargo-make] INFO - Running Task: end
[cargo-make] INFO - Build Done in 0 seconds.
/home/ma27/Projects/ratatosk
[cargo-make] INFO - cargo make 0.27.0
[cargo-make] INFO - External file not found or is not a file, skipping.
[cargo-make] INFO - Project: rask-wasm-graphics
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: check-format
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: init
[cargo-make] INFO - Running Task: check-format
[cargo-make] INFO - Execute Command: "cargo" "fmt" "--" "--check"
Diff in /home/ma27/Projects/ratatosk/client/graphics/src/entries.rs at line 10:
#[wasm_bindgen]
pub fn initialise(canvas: web_sys::OffscreenCanvas) {
unsafe {
- crate::ALLOCATOR.reset();
+ crate::ALLOCATOR.reset();
}
log::set_boxed_logger(Box::new(WasmLog::new()))
[cargo-make] ERROR - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
[cargo-make] ERROR - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
cargo make format currently just skips all repos, see ci.kobert.dev for an example