Skip to content

Commit 0cf38b5

Browse files
authored
use tombi for toml formatting (#2894)
1 parent a57cbf2 commit 0cf38b5

File tree

8 files changed

+80
-71
lines changed

8 files changed

+80
-71
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,16 @@ jobs:
253253

254254
- run: cargo fmt -- --check
255255

256-
- name: cargo-sort
256+
- name: tombi install
257+
uses: tombi-toml/setup-tombi@v1
258+
env:
259+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
260+
with:
261+
version: '0.9.0'
262+
263+
- name: tombi check
257264
run: |
258-
cargo install cargo-sort --force
259-
cargo sort -c -w
265+
tombi format --check
260266
261267
- name: cargo-deny install
262268
run: |

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Changed
11+
* use [tombi](https://github.com/tombi-toml/tombi) for all toml file formatting
12+
1013
### Fixes
1114
* when staging the last file in a directory, the first item after the directory is no longer skipped [[@Tillerino](https://github.com/Tillerino)] ([#2748](https://github.com/gitui-org/gitui/issues/2748))
1215

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ deny:
105105
cargo deny check
106106

107107
sort:
108-
cargo sort -c -w "."
108+
tombi format --check
109109

110110
install:
111111
cargo install --path "." --offline --locked

asyncgit/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ license = "MIT"
1111
categories = ["asynchronous", "concurrency"]
1212
keywords = ["git"]
1313

14-
[features]
15-
default = ["trace-libgit"]
16-
trace-libgit = []
17-
vendor-openssl = ["openssl-sys"]
18-
1914
[dependencies]
2015
bitflags = "2"
2116
crossbeam-channel = "0.5"
@@ -50,3 +45,8 @@ invalidstring = { path = "../invalidstring", version = "0.1" }
5045
pretty_assertions = "1.4"
5146
serial_test = "3.3"
5247
tempfile = "3"
48+
49+
[features]
50+
default = ["trace-libgit"]
51+
trace-libgit = []
52+
vendor-openssl = ["openssl-sys"]

deny.toml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11
[licenses]
22
allow = [
3-
"MIT",
4-
"Apache-2.0",
5-
"BSD-2-Clause",
6-
"BSD-3-Clause",
7-
"CC0-1.0",
8-
"ISC",
9-
"MPL-2.0",
10-
"Unicode-3.0",
11-
"Zlib",
3+
"MIT",
4+
"Apache-2.0",
5+
"BSD-2-Clause",
6+
"BSD-3-Clause",
7+
"CC0-1.0",
8+
"ISC",
9+
"MPL-2.0",
10+
"Unicode-3.0",
11+
"Zlib",
1212
]
1313

1414
[advisories]
1515
version = 2
1616
ignore = [
17-
# No fix for RSA, and this is a dependency from ssh_key crate to handle rsa ssh key.
18-
# https://rustsec.org/advisories/RUSTSEC-2023-0071
19-
"RUSTSEC-2023-0071",
20-
# Crate paste is unmaintained. The dependency is already removed in
21-
# ratatui:master. Until a new release is available, ignore this in
22-
# order to pass CI. (https://github.com/gitui-org/gitui/issues/2554)
23-
{ id = "RUSTSEC-2024-0436", reason = "The paste dependency is already removed from ratatui." },
24-
# See https://github.com/trishume/syntect/issues/606
25-
{ id = "RUSTSEC-2025-0141", reason = "Only brought in via syntect" },
17+
# No fix for RSA, and this is a dependency from ssh_key crate to handle rsa ssh key.
18+
# https://rustsec.org/advisories/RUSTSEC-2023-0071
19+
"RUSTSEC-2023-0071",
20+
# Crate paste is unmaintained. The dependency is already removed in
21+
# ratatui:master. Until a new release is available, ignore this in
22+
# order to pass CI. (https://github.com/gitui-org/gitui/issues/2554)
23+
{ id = "RUSTSEC-2024-0436", reason = "The paste dependency is already removed from ratatui." },
24+
# See https://github.com/trishume/syntect/issues/606
25+
{ id = "RUSTSEC-2025-0141", reason = "Only brought in via syntect" },
2626
]
2727

2828
[bans]
2929
multiple-versions = "deny"
3030
skip-tree = [
31-
# currently needed due to:
32-
# * `dirs-sys v0.4.1` (https://github.com/dirs-dev/dirs-sys-rs/issues/29)
33-
{ name = "windows-sys" },
34-
# this is needed for:
35-
# `bwrap v1.3.0` (https://github.com/micl2e2/bwrap/pull/4)
36-
{ name = "unicode-width" },
37-
# currently needed due to `ratatui v0.29.0`
38-
{ name = "unicode-truncate" },
39-
# currently needed due to:
40-
# * `redox_users v0.4.6`
41-
# * `syntect v5.2.0`
42-
{ name = "thiserror" },
43-
# currently needed due to:
44-
# * `windows v0.57.0`
45-
# * `iana-time-zone v0.1.60`
46-
{ name = "windows-core" },
47-
# currently needed due to:
48-
# * `parking_lot_core v0.9.10`
49-
# * `filetime v0.2.23`
50-
{ name = "redox_syscall" },
51-
# currently needed due to:
52-
# * `gix-hashtable v0.6.0`
53-
{ name = "hashbrown" },
54-
# 2022-10-26 `getrandom` and `rustix` were added when `gitoxide` was
55-
# upgraded from 0.71.0 to 0.74.1.
56-
# currently needed due to:
57-
# * `tempfile v3.23.0`
58-
# * `rand_core v0.6.4`
59-
# * `redox_users v0.5.0`
60-
{ name = "getrandom" },
61-
# currently needed due to:
62-
# * `crossterm v0.28.1`
63-
# * `which v7.0.2`
64-
# * `gix-index v0.42.1`
65-
# * `tempfile v3.23.0`
66-
{ name = "rustix" },
31+
# currently needed due to:
32+
# * `dirs-sys v0.4.1` (https://github.com/dirs-dev/dirs-sys-rs/issues/29)
33+
{ name = "windows-sys" },
34+
# this is needed for:
35+
# `bwrap v1.3.0` (https://github.com/micl2e2/bwrap/pull/4)
36+
{ name = "unicode-width" },
37+
# currently needed due to `ratatui v0.29.0`
38+
{ name = "unicode-truncate" },
39+
# currently needed due to:
40+
# * `redox_users v0.4.6`
41+
# * `syntect v5.2.0`
42+
{ name = "thiserror" },
43+
# currently needed due to:
44+
# * `windows v0.57.0`
45+
# * `iana-time-zone v0.1.60`
46+
{ name = "windows-core" },
47+
# currently needed due to:
48+
# * `parking_lot_core v0.9.10`
49+
# * `filetime v0.2.23`
50+
{ name = "redox_syscall" },
51+
# currently needed due to:
52+
# * `gix-hashtable v0.6.0`
53+
{ name = "hashbrown" },
54+
# 2022-10-26 `getrandom` and `rustix` were added when `gitoxide` was
55+
# upgraded from 0.71.0 to 0.74.1.
56+
# currently needed due to:
57+
# * `tempfile v3.23.0`
58+
# * `rand_core v0.6.4`
59+
# * `redox_users v0.5.0`
60+
{ name = "getrandom" },
61+
# currently needed due to:
62+
# * `crossterm v0.28.1`
63+
# * `which v7.0.2`
64+
# * `gix-index v0.42.1`
65+
# * `tempfile v3.23.0`
66+
{ name = "rustix" },
6767
]

filetreelist/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = "https://github.com/gitui-org/gitui"
99
readme = "README.md"
1010
license = "MIT"
1111
categories = ["command-line-utilities"]
12-
keywords = ["gui", "cli", "terminal", "ui", "tui"]
12+
keywords = ["cli", "gui", "terminal", "tui", "ui"]
1313
exclude = ["/demo.gif"]
1414

1515
[dependencies]

rustfmt.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
max_width=70
2-
hard_tabs=true
3-
newline_style="Unix"
1+
max_width = 70
2+
hard_tabs = true
3+
newline_style = "Unix"

scopetime/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ repository = "https://github.com/gitui-org/gitui"
99
license = "MIT"
1010
readme = "README.md"
1111
categories = ["development-tools::profiling"]
12-
keywords = ["profiling", "logging"]
12+
keywords = ["logging", "profiling"]
13+
14+
[dependencies]
15+
log = "0.4"
1316

1417
[features]
1518
default = []
1619
enabled = []
17-
18-
[dependencies]
19-
log = "0.4"

0 commit comments

Comments
 (0)