Skip to content

Commit 9ecec85

Browse files
authored
Add formatting tasks for Rust, Deno, and Python (#185)
Introduce separate format tasks for Rust, Deno, and Python codebases to standardize code style across all clients. Add a new aggregate `format` task that depends on all individual format tasks, enabling a single command to format all code. Update Rust lint task to use `rustfmt --check` for consistency with formatting commands.
1 parent 261a750 commit 9ecec85

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

mise.toml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,31 @@ depends = ["gen:python", "build:rust"]
9797
description = "Build all targets"
9898
depends = ["build:*"]
9999

100+
## Format
101+
102+
[tasks."format:rust"]
103+
description = "Format rust code"
104+
run = ["rustfmt src/**/*.rs"]
105+
106+
[tasks."format:deno"]
107+
description = "Format deno code"
108+
run = ["deno fmt src/clients/deno"]
109+
110+
[tasks."format:python"]
111+
description = "Format python code"
112+
run = ["ruff format src/clients/python"]
113+
114+
[tasks.format]
115+
alias = "fmt"
116+
description = "Format all code"
117+
depends = ["format:*"]
118+
100119
## Lint
101120

102121
[tasks."lint:rust"]
103122
description = "Run clippy against rust code"
104123
depends = ["ci:install-deps"]
105-
run = ["cargo fmt --check", "cargo clippy"]
124+
run = ["rustfmt --check src/**/*.rs", "cargo clippy"]
106125

107126
[tasks."lint:deno"]
108127
description = "Run deno lint"

0 commit comments

Comments
 (0)