Skip to content

Commit d7cef6d

Browse files
authored
Merge pull request BraneFramework#281 from BraneFramework/cargo-toml
TOML changes
2 parents b55176e + b1221fa commit d7cef6d

File tree

28 files changed

+489
-513
lines changed

28 files changed

+489
-513
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,13 @@ jobs:
119119
components: rustfmt
120120
- name: Show toolchain
121121
run: rustup show active-toolchain
122-
- name: Run formatter
122+
- name: Run Cargo formatter
123123
run: cargo +nightly fmt --all --check
124-
124+
- uses: uncenter/setup-taplo@v1
125+
with:
126+
version: "0.8.1"
127+
- name: Run toml formatter
128+
run: taplo fmt --check -- **.toml
125129
doc:
126130
# Note that we don't depend on check in stable or nightly
127131
# as code need not compile for the formatter to work

.taplo.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[formatting]
2+
align_comments = true
3+
align_entries = false
4+
allowed_blank_lines = 2
5+
array_auto_collapse = true
6+
array_auto_expand = true
7+
array_trailing_comma = true
8+
column_width = 120
9+
compact_arrays = true
10+
compact_entries = false
11+
compact_inline_tables = false
12+
crlf = false
13+
indent_entries = false
14+
indent_string = " "
15+
indent_tables = false
16+
inline_table_expand = true
17+
reorder_arrays = false
18+
reorder_inline_tables = false
19+
reorder_keys = false
20+
trailing_newline = true
21+
22+
# Taplo: Force order of formatter settings
23+
[[rule]]
24+
include = [".taplo.toml", "taplo.toml"]
25+
keys = ["formatting"]
26+
formatting = { reorder_keys = true }
27+
28+
# Cargo: Sort dependencies
29+
[[rule]]
30+
include = ["**/Cargo.toml"]
31+
keys = ["dependencies", "workspace.dependencies"]
32+
formatting = { reorder_keys = true }
33+
34+
# Cargo: Sort workspace members
35+
[[rule]]
36+
include = ["**/Cargo.toml"]
37+
keys = ["workspace.members"]
38+
formatting = { reorder_array = true }
39+
40+
# Cargo deny: Sort allowed licenses
41+
[[rule]]
42+
include = ["deny.toml"]
43+
keys = ["licenses"]
44+
formatting = { reorder_arrays = true }

Cargo.lock

Lines changed: 13 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)