Add cargo-fmt
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/all-checks-complete unknown status

This commit is contained in:
Smaug123
2024-07-14 14:58:58 +01:00
parent 5161a4162d
commit 9681a86ac1
2 changed files with 3 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ steps:
commands: commands:
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf - echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
# Lint # Lint
- nix develop --command cargo -- fmt --all -- --check - nix develop .#ci --command cargo -- fmt --all -- --check
- nix develop --command cargo -- clippy -- -D warnings -W clippy::must_use_candidate - nix develop --command cargo -- clippy -- -D warnings -W clippy::must_use_candidate
- nix develop .#ci --command alejandra -- --check . - nix develop .#ci --command alejandra -- --check .
- nix develop .#ci --command markdown-link-check README.md - nix develop .#ci --command markdown-link-check README.md

View File

@@ -63,7 +63,7 @@
}; };
# Configuration for the non-Rust dependencies # Configuration for the non-Rust dependencies
buildInputs = with pkgs; [openssl.dev]; buildInputs = [pkgs.openssl.dev];
nativeBuildInputs = with pkgs; [rustc cargo pkg-config]; nativeBuildInputs = with pkgs; [rustc cargo pkg-config];
buildEnvVars = { buildEnvVars = {
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
@@ -86,7 +86,7 @@
ci = ci =
pkgs.mkShell { pkgs.mkShell {
inherit nativeBuildInputs; inherit nativeBuildInputs;
buildInputs = [pkgs.nodePackages.markdown-link-check pkgs.alejandra] ++ buildInputs; buildInputs = [pkgs.cargo-fmt pkgs.nodePackages.markdown-link-check pkgs.alejandra] ++ buildInputs;
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
} }
// buildEnvVars; // buildEnvVars;