-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
81 lines (67 loc) · 1.7 KB
/
Makefile.toml
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
# Clean
[tasks.clean]
command = "cargo"
args = ["clean"]
# Test
[tasks.test]
command = "cargo"
args = ["test"]
# Lint
[tasks.lint]
script = '''
cargo clippy -- \
-D clippy::all \
-D clippy::pedantic \
-D clippy::nursery \
-D clippy::cargo \
-A clippy::arithmetic_side_effects \
-A clippy::integer_division \
-A clippy::float_arithmetic \
-A clippy::cast_precision_loss \
-A clippy::missing-docs-in-private-items \
-A clippy::implicit_return \
-A clippy::separated_literal_suffix \
-A clippy::std_instead_of_core \
-A clippy::mod_module_files \
-A clippy::option_if_let_else \
-A clippy::missing_trait_methods
'''
# Format
## Check
[tasks.rust-fmt-check]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--check"]
[tasks.toml-fmt-check]
install_crate = { crate_name = "taplo-cli", binary = "taplo", test_arg = "--help" }
command = "taplo"
args = ["fmt", "--check", "*.toml"]
[tasks.md-fmt-check]
command = "markdownlint"
args = ["*.md", "--config", ".markdownlint.jsonc"]
[tasks.fmt-check]
dependencies = ["rust-fmt-check", "toml-fmt-check", "md-fmt-check"]
## Fix
[tasks.rust-fmt-fix]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt"]
[tasks.toml-fmt-fix]
install_crate = { crate_name = "taplo-cli", binary = "taplo", test_arg = "--help" }
command = "taplo"
args = ["fmt", "*.toml"]
[tasks.md-fmt-fix]
command = "markdownlint"
args = ["*.md", "--config", ".markdownlint.jsonc", "--fix"]
[tasks.fmt-fix]
dependencies = ["rust-fmt-fix", "toml-fmt-fix", "md-fmt-fix"]
# Build
[tasks.release]
dependencies = ["clean"]
command = "cargo"
args = ["build", "--release"]
# Final
[tasks.build]
dependencies = ["fmt-fix", "lint", "test"]
[tasks.ci]
dependencies = ["fmt-check", "lint", "test", "release"]