From bd2b3519e3bbe2385b0abd28c92d99c2fbec50de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 7 Mar 2026 11:08:21 +0100 Subject: [PATCH 1/4] Move comment in cargo manifest To adapt to new version of cargo-sort. --- Cargo.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 9a48f0a8..1a558528 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,10 @@ rust-version = "1.88" publish = false [package.metadata.cargo-machete] -ignored = ["serde_bytes"] # Used by the SecretFile API. +ignored = [ + # Used by the SecretFile API. + "serde_bytes", +] [profile.release] debug = true From 8e40c37cf9b008e346dd1751bd7afc2ffcd48e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 7 Mar 2026 11:10:21 +0100 Subject: [PATCH 2/4] Update MSRV To match the one from matrix-sdk. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1a558528..a1c6cccd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "13.0.0" authors = ["Julian Sparber "] license = "GPL-3.0-or-later" edition = "2024" -rust-version = "1.88" +rust-version = "1.93" publish = false [package.metadata.cargo-machete] From c6f96f29fa3a3cb15b9635d8f1db21910fd7495a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sun, 8 Mar 2026 11:52:07 +0100 Subject: [PATCH 3/4] Upgrade cargo-codeclimate --- .gitlab-ci/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/check.yml b/.gitlab-ci/check.yml index 6a23615f..56cf4487 100644 --- a/.gitlab-ci/check.yml +++ b/.gitlab-ci/check.yml @@ -20,8 +20,8 @@ flatpak-checks: - flatpak interruptible: true variables: - CARGO_CODECLIMATE_DOWNLOAD_URL: "https://gitlab.com/woshilapin/cargo-sonar/-/releases/1.3.1/downloads/bin/x86_64-unknown-linux-musl/cargo-codeclimate" - CARGO_CODECLIMATE_SHA256SUM: "401d1cf22d2f1b6f1986b479517c31e0544e8b7ecbb70f30e684ca7c171a0f17" + CARGO_CODECLIMATE_DOWNLOAD_URL: "https://gitlab.com/woshilapin/cargo-sonar/-/releases/1.5.0/downloads/bin/x86_64-unknown-linux-musl/cargo-codeclimate" + CARGO_CODECLIMATE_SHA256SUM: "3343a9c4e8b11fc5bdd63fbdecd883e5d37af1ca03414c289c7d57613146c1cf" script: # Initialize the Flatpak sandbox. - flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH} From 71231bd66bb979e1cb31611e299c92dbd15e1172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sun, 8 Mar 2026 11:44:52 +0100 Subject: [PATCH 4/4] ci: Improve clippy output We run clippy twice: once to generate the JSON format for the code quality report, and the second time to get the real output which should be faster because the build is cached. --- .gitlab-ci/check.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/check.yml b/.gitlab-ci/check.yml index 56cf4487..af44c54e 100644 --- a/.gitlab-ci/check.yml +++ b/.gitlab-ci/check.yml @@ -26,7 +26,12 @@ flatpak-checks: # Initialize the Flatpak sandbox. - flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH} # Lint the Rust code with clippy. - - echo "cargo clippy --message-format=json -- -D warnings > clippy-report.json " | flatpak-builder --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} + # We need to run it twice: the first time generates the JSON output for the + # code quality report, and the second time generates the regular output with + # more details. + - echo "cargo clippy --message-format=json -- -D warnings > clippy-report.json || cargo clippy -- -D warnings" | flatpak-builder --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} + # Move the report file or it will be deleted when running the next command. + - mv .flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/clippy-report.json ./ # Lint the Blueprint files. - echo "blueprint-compiler format ../src" | flatpak-builder --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} # Lint the Meson files. @@ -39,7 +44,7 @@ flatpak-checks: - sha256sum -c cargo-codeclimate.sha256sum - chmod +x cargo-codeclimate # Convert the clippy report to CodeClimate / GitLab Code Quality format. - - ./cargo-codeclimate --clippy --clippy-path .flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/clippy-report.json + - ./cargo-codeclimate --clippy --clippy-path clippy-report.json artifacts: reports: codequality: codeclimate.json