use tombi for toml formatting (#2894)

This commit is contained in:
extrawurst 2026-03-28 21:02:05 +01:00 committed by GitHub
parent a57cbf2806
commit 0cf38b5def
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 80 additions and 71 deletions

View file

@ -253,10 +253,16 @@ jobs:
- run: cargo fmt -- --check - run: cargo fmt -- --check
- name: cargo-sort - name: tombi install
uses: tombi-toml/setup-tombi@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: '0.9.0'
- name: tombi check
run: | run: |
cargo install cargo-sort --force tombi format --check
cargo sort -c -w
- name: cargo-deny install - name: cargo-deny install
run: | run: |

View file

@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Changed
* use [tombi](https://github.com/tombi-toml/tombi) for all toml file formatting
### Fixes ### Fixes
* 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)) * 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))

View file

@ -105,7 +105,7 @@ deny:
cargo deny check cargo deny check
sort: sort:
cargo sort -c -w "." tombi format --check
install: install:
cargo install --path "." --offline --locked cargo install --path "." --offline --locked

View file

@ -11,11 +11,6 @@ license = "MIT"
categories = ["asynchronous", "concurrency"] categories = ["asynchronous", "concurrency"]
keywords = ["git"] keywords = ["git"]
[features]
default = ["trace-libgit"]
trace-libgit = []
vendor-openssl = ["openssl-sys"]
[dependencies] [dependencies]
bitflags = "2" bitflags = "2"
crossbeam-channel = "0.5" crossbeam-channel = "0.5"
@ -50,3 +45,8 @@ invalidstring = { path = "../invalidstring", version = "0.1" }
pretty_assertions = "1.4" pretty_assertions = "1.4"
serial_test = "3.3" serial_test = "3.3"
tempfile = "3" tempfile = "3"
[features]
default = ["trace-libgit"]
trace-libgit = []
vendor-openssl = ["openssl-sys"]

108
deny.toml
View file

@ -1,67 +1,67 @@
[licenses] [licenses]
allow = [ allow = [
"MIT", "MIT",
"Apache-2.0", "Apache-2.0",
"BSD-2-Clause", "BSD-2-Clause",
"BSD-3-Clause", "BSD-3-Clause",
"CC0-1.0", "CC0-1.0",
"ISC", "ISC",
"MPL-2.0", "MPL-2.0",
"Unicode-3.0", "Unicode-3.0",
"Zlib", "Zlib",
] ]
[advisories] [advisories]
version = 2 version = 2
ignore = [ ignore = [
# No fix for RSA, and this is a dependency from ssh_key crate to handle rsa ssh key. # No fix for RSA, and this is a dependency from ssh_key crate to handle rsa ssh key.
# https://rustsec.org/advisories/RUSTSEC-2023-0071 # https://rustsec.org/advisories/RUSTSEC-2023-0071
"RUSTSEC-2023-0071", "RUSTSEC-2023-0071",
# Crate paste is unmaintained. The dependency is already removed in # Crate paste is unmaintained. The dependency is already removed in
# ratatui:master. Until a new release is available, ignore this in # ratatui:master. Until a new release is available, ignore this in
# order to pass CI. (https://github.com/gitui-org/gitui/issues/2554) # order to pass CI. (https://github.com/gitui-org/gitui/issues/2554)
{ id = "RUSTSEC-2024-0436", reason = "The paste dependency is already removed from ratatui." }, { id = "RUSTSEC-2024-0436", reason = "The paste dependency is already removed from ratatui." },
# See https://github.com/trishume/syntect/issues/606 # See https://github.com/trishume/syntect/issues/606
{ id = "RUSTSEC-2025-0141", reason = "Only brought in via syntect" }, { id = "RUSTSEC-2025-0141", reason = "Only brought in via syntect" },
] ]
[bans] [bans]
multiple-versions = "deny" multiple-versions = "deny"
skip-tree = [ skip-tree = [
# currently needed due to: # currently needed due to:
# * `dirs-sys v0.4.1` (https://github.com/dirs-dev/dirs-sys-rs/issues/29) # * `dirs-sys v0.4.1` (https://github.com/dirs-dev/dirs-sys-rs/issues/29)
{ name = "windows-sys" }, { name = "windows-sys" },
# this is needed for: # this is needed for:
# `bwrap v1.3.0` (https://github.com/micl2e2/bwrap/pull/4) # `bwrap v1.3.0` (https://github.com/micl2e2/bwrap/pull/4)
{ name = "unicode-width" }, { name = "unicode-width" },
# currently needed due to `ratatui v0.29.0` # currently needed due to `ratatui v0.29.0`
{ name = "unicode-truncate" }, { name = "unicode-truncate" },
# currently needed due to: # currently needed due to:
# * `redox_users v0.4.6` # * `redox_users v0.4.6`
# * `syntect v5.2.0` # * `syntect v5.2.0`
{ name = "thiserror" }, { name = "thiserror" },
# currently needed due to: # currently needed due to:
# * `windows v0.57.0` # * `windows v0.57.0`
# * `iana-time-zone v0.1.60` # * `iana-time-zone v0.1.60`
{ name = "windows-core" }, { name = "windows-core" },
# currently needed due to: # currently needed due to:
# * `parking_lot_core v0.9.10` # * `parking_lot_core v0.9.10`
# * `filetime v0.2.23` # * `filetime v0.2.23`
{ name = "redox_syscall" }, { name = "redox_syscall" },
# currently needed due to: # currently needed due to:
# * `gix-hashtable v0.6.0` # * `gix-hashtable v0.6.0`
{ name = "hashbrown" }, { name = "hashbrown" },
# 2022-10-26 `getrandom` and `rustix` were added when `gitoxide` was # 2022-10-26 `getrandom` and `rustix` were added when `gitoxide` was
# upgraded from 0.71.0 to 0.74.1. # upgraded from 0.71.0 to 0.74.1.
# currently needed due to: # currently needed due to:
# * `tempfile v3.23.0` # * `tempfile v3.23.0`
# * `rand_core v0.6.4` # * `rand_core v0.6.4`
# * `redox_users v0.5.0` # * `redox_users v0.5.0`
{ name = "getrandom" }, { name = "getrandom" },
# currently needed due to: # currently needed due to:
# * `crossterm v0.28.1` # * `crossterm v0.28.1`
# * `which v7.0.2` # * `which v7.0.2`
# * `gix-index v0.42.1` # * `gix-index v0.42.1`
# * `tempfile v3.23.0` # * `tempfile v3.23.0`
{ name = "rustix" }, { name = "rustix" },
] ]

View file

@ -9,7 +9,7 @@ repository = "https://github.com/gitui-org/gitui"
readme = "README.md" readme = "README.md"
license = "MIT" license = "MIT"
categories = ["command-line-utilities"] categories = ["command-line-utilities"]
keywords = ["gui", "cli", "terminal", "ui", "tui"] keywords = ["cli", "gui", "terminal", "tui", "ui"]
exclude = ["/demo.gif"] exclude = ["/demo.gif"]
[dependencies] [dependencies]

View file

@ -1,3 +1,3 @@
max_width=70 max_width = 70
hard_tabs=true hard_tabs = true
newline_style="Unix" newline_style = "Unix"

View file

@ -9,11 +9,11 @@ repository = "https://github.com/gitui-org/gitui"
license = "MIT" license = "MIT"
readme = "README.md" readme = "README.md"
categories = ["development-tools::profiling"] categories = ["development-tools::profiling"]
keywords = ["profiling", "logging"] keywords = ["logging", "profiling"]
[dependencies]
log = "0.4"
[features] [features]
default = [] default = []
enabled = [] enabled = []
[dependencies]
log = "0.4"