Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ env:
RUSTFLAGS: --deny warnings
msrv: 1.78
jobs:
cargo-shear:
name: Run cargo shear
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v17
- name: Enter DevShell
run: nix develop
- name: Nix Flake Check
run: cargo shear
security_audit:
runs-on: ubuntu-latest
steps:
Expand Down
119 changes: 1 addition & 118 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,10 @@ uutils_term_grid = "0.7.0"
terminal_size = "0.4.2"
timeago = { version = "0.4.2", default-features = false }
unicode-width = "0.2"
zoneinfo_compiled = "0.5.1"
ansi-width = "0.1.0"
serde = { version = "1.0.219", features = ["derive"] }
dirs = "6.0.0"
serde_norway = "0.9"
backtrace = "0.3"

[dependencies.git2]
version = "0.20"
Expand Down
15 changes: 15 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
# For generating demo
vhs

cargo-shear

powertest.packages.${pkgs.system}.default

cargo-hack
Expand Down Expand Up @@ -177,6 +179,19 @@
entry = with pkgs; "${reuse}/bin/reuse lint";
pass_filenames = false;
};
"cargo-shear" = {
enable = true;
name = "Check for unused dependencies";
extraPackages = [ toolchain ];
files = "\\.(rs|toml)$";
entry = pkgs.lib.getExe (
pkgs.writeShellScriptBin "cargo-shear-hook" ''
set -e
export CARGO_NET_OFFLINE=true
${pkgs.lib.getExe pkgs.cargo-shear} "$@"
. ''
);
};
};
};
formatting = treefmtEval.config.build.check self;
Expand Down
Loading