From 00273009e7553229bccc02e9f4a00d6f8acb9cd5 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Sun, 27 Jul 2025 02:16:15 -0700 Subject: [PATCH] style(formatting): use spaces instead of tabs (#1184) Update formatting rules to use spaces instead of tabs for indentation, wrap at 100 characters, and remove the setting that aligns struct fields vertically as this generally harms readability. These changes make the code more consistent with the Rust community's conventions and improve readability by not truncating lines too early. --- .github/workflows/ci.yml | 5 +- git-cliff-core/src/changelog.rs | 2517 ++++++++-------- git-cliff-core/src/command.rs | 131 +- git-cliff-core/src/commit.rs | 1805 ++++++------ git-cliff-core/src/config.rs | 861 +++--- git-cliff-core/src/contributor.rs | 26 +- git-cliff-core/src/embed.rs | 72 +- git-cliff-core/src/error.rs | 261 +- git-cliff-core/src/lib.rs | 4 +- git-cliff-core/src/release.rs | 3425 +++++++++++----------- git-cliff-core/src/remote/bitbucket.rs | 305 +- git-cliff-core/src/remote/gitea.rs | 261 +- git-cliff-core/src/remote/github.rs | 280 +- git-cliff-core/src/remote/gitlab.rs | 512 ++-- git-cliff-core/src/remote/mod.rs | 582 ++-- git-cliff-core/src/repo.rs | 1783 ++++++----- git-cliff-core/src/statistics.rs | 543 ++-- git-cliff-core/src/tag.rs | 68 +- git-cliff-core/src/template.rs | 516 ++-- git-cliff-core/tests/integration_test.rs | 456 ++- git-cliff/examples/run.rs | 6 +- git-cliff/src/args.rs | 610 ++-- git-cliff/src/bin/completions.rs | 19 +- git-cliff/src/bin/mangen.rs | 19 +- git-cliff/src/lib.rs | 1367 +++++---- git-cliff/src/logger.rs | 228 +- git-cliff/src/main.rs | 68 +- git-cliff/src/profiler.rs | 82 +- rust-toolchain.toml | 2 + rustfmt.toml | 10 +- 30 files changed, 8177 insertions(+), 8647 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c91b76e..17af39f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,10 +112,7 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Check the formatting - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 - with: - command: fmt - args: --all -- --check --verbose + run: cargo +nightly fmt --all -- --check --verbose doctest: name: Doctests diff --git a/git-cliff-core/src/changelog.rs b/git-cliff-core/src/changelog.rs index fde2cd62..7d374459 100644 --- a/git-cliff-core/src/changelog.rs +++ b/git-cliff-core/src/changelog.rs @@ -19,698 +19,646 @@ use crate::template::Template; /// Changelog generator. #[derive(Debug)] pub struct Changelog<'a> { - /// Releases that the changelog will contain. - pub releases: Vec>, - header_template: Option