Repository navigation
Expand file tree
/
Copy pathmise.toml
More file actions
90 lines (75 loc) · 3.21 KB
/
Copy pathmise.toml
File metadata and controls
90 lines (75 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#:tombi schema.strict = false
[settings]
experimental = true
[tools]
rust = { version = "1.96.0", profile = "minimal", components = "rustfmt,clippy" }
# "github:kucherenko/jscpd" = {version = "latest", exec = "cpd" }
# "github:release-plz/release-plz" = "latest"
# "github:orhun/git-cliff" = "latest"
# "github:axodotdev/cargo-dist" = "latest"
# "asciinema" = "latest" # can be installed via brew
# "cargo:agg" = "latest" # can be installed via brew
[tasks."build"]
description = "compile the workspace"
run = "cargo --locked build --workspace"
[tasks."test"]
description = "run the test suite"
run = "cargo --locked test --workspace"
[tasks."format"]
alias = "fmt"
description = "format the code"
run = "cargo --locked fmt"
[tasks."lint"]
description = "clippy (warnings = errors) + core-no-io guard"
depends = ["lint:core-no-io"]
run = "cargo --locked clippy --workspace --all-targets --all-features --no-deps -- -D warnings"
[tasks."lint:core-no-io"]
description = "enforce spec §5: todoapp-core has no I/O / framework deps"
hide = true
# ponytail: grep guard; switch to cargo-deny [bans] if todoapp-core's allowed deps grow.
run = """
cargo --locked tree -p todoapp-core --edges normal --prefix none \
| rg -iw 'tokio|turso|libsql|axum|clap|ratatui|crossterm|reqwest|hyper|rmcp|bevy_ecs' \
&& { echo 'todoapp-core must not depend on I/O / framework crates (spec §5)'; exit 1; } || exit 0
"""
[tasks."lint:megalinter"]
description = "run the MegaLinter (`rust` flavor) locally on code see https://megalinter.io/latest/config-file/ to configure (heavy download and longer to run)"
# run = "bunx mega-linter-runner --flavor rust" # wrapper for docker command
run = "docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:rw -v $(pwd):/tmp/lint:rw ghcr.io/oxsecurity/megalinter-rust:v9"
[tasks."lint:duplicate"]
description = "detect code duplication (with jscpd)"
run = "cpd crates/ --threshold 5 --reporters console"
[tasks."autofix"]
description = "auto-fix lints, then format"
depends_post = ["format"]
run = [
"cargo fix --allow-dirty --workspace --all-targets",
"cargo clippy --fix --allow-dirty --workspace --all-targets --all-features --no-deps",
]
[tasks."ci"]
description = "the full CI gate"
depends = ["lint", "test"]
run = "cargo --locked fmt --check"
[tasks."release-pr"]
description = "dry-run the release-plz version bump + changelog locally"
run = "release-plz update"
[tasks."demo:record"]
description = "record the demo with asciinema and convert into animated gif"
dir = "docs"
run = [
# "asciinema rec --command 'cargo run -- tui' -t 'todoapp tui' --idle-time-limit 2 --overwrite demo.cast --cols 100 --rows 28",
"asciinema rec --command '../target/debug/tda tui' -t 'todoapp tui' --idle-time-limit 2 --overwrite demo.cast --cols 100 --rows 28",
"agg demo.cast demo.gif --font-size 16 --speed 1.2",
]
[tasks."demo:play"]
dir = "docs"
run = [
"asciinema play demo.cast",
# "xdg-open demo.gif",
]
[tasks."demo:mp4"]
description = "convert demo.gif into a mp4 (without sound)"
dir = "docs"
# MP4 for YouTube/Bluesky (agg doesn't do mp4 directly — convert gif, or use a
# terminal recorder w/ ffmpeg passthrough)
run = 'ffmpeg -i demo.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" demo.mp4'