diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d1cacfc..218348be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,12 +134,12 @@ jobs: with: save-cache: ${{ github.ref_name == 'main' }} cache-key: fmt - tools: cargo-shear + tools: cargo-shear@1.11.1 components: clippy rust-docs rustfmt - uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4 - run: pnpm oxfmt --check - - run: cargo shear + - run: cargo shear --deny-warnings - run: cargo fmt --check - run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items diff --git a/Cargo.toml b/Cargo.toml index 1602c6b5..778c5d4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -158,9 +158,6 @@ ignored = [ # These are artifact dependencies. They are not directly `use`d in Rust code. "fspy_preload_unix", "fspy_preload_windows", - "fspy_test_bin", - # used in a macro in crates/subprocess_test/src/lib.rs - "ctor", ] [profile.dev] diff --git a/crates/fspy/Cargo.toml b/crates/fspy/Cargo.toml index 6b5869bc..988a9888 100644 --- a/crates/fspy/Cargo.toml +++ b/crates/fspy/Cargo.toml @@ -64,3 +64,9 @@ xxhash-rust = { workspace = true, features = ["xxh3"] } [lints] workspace = true + +[lib] +doctest = false + +[package.metadata.cargo-shear] +ignored = ["ctor", "fspy_test_bin"] diff --git a/crates/fspy_detours_sys/Cargo.toml b/crates/fspy_detours_sys/Cargo.toml index 01f57e9e..2c9e082e 100644 --- a/crates/fspy_detours_sys/Cargo.toml +++ b/crates/fspy_detours_sys/Cargo.toml @@ -23,3 +23,7 @@ workspace = true [dev-dependencies] bindgen = { workspace = true } cow-utils = { workspace = true } + +[lib] +test = false +doctest = false diff --git a/crates/fspy_seccomp_unotify/Cargo.toml b/crates/fspy_seccomp_unotify/Cargo.toml index 5dbfbd24..be581839 100644 --- a/crates/fspy_seccomp_unotify/Cargo.toml +++ b/crates/fspy_seccomp_unotify/Cargo.toml @@ -29,3 +29,7 @@ target = ["dep:passfd"] [lints] workspace = true + +[lib] +test = false +doctest = false diff --git a/crates/fspy_seccomp_unotify/src/payload/fd.rs b/crates/fspy_seccomp_unotify/src/payload/fd.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/crates/fspy_shared/Cargo.toml b/crates/fspy_shared/Cargo.toml index a5165e73..cc63d9cf 100644 --- a/crates/fspy_shared/Cargo.toml +++ b/crates/fspy_shared/Cargo.toml @@ -29,3 +29,6 @@ subprocess_test = { workspace = true } [lints] workspace = true + +[lib] +doctest = false diff --git a/crates/fspy_shared_unix/Cargo.toml b/crates/fspy_shared_unix/Cargo.toml index 4593501f..4afedf81 100644 --- a/crates/fspy_shared_unix/Cargo.toml +++ b/crates/fspy_shared_unix/Cargo.toml @@ -25,3 +25,6 @@ phf = { workspace = true } [lints] workspace = true + +[lib] +doctest = false diff --git a/crates/fspy_shared_unix/src/exec/fs.rs b/crates/fspy_shared_unix/src/exec/fs.rs deleted file mode 100644 index dabba5bd..00000000 --- a/crates/fspy_shared_unix/src/exec/fs.rs +++ /dev/null @@ -1,11 +0,0 @@ -// pub trait FileSystem { -// fn peek_executable(&self, path: &Path, buf: &mut [u8]) -> nix::Result; -// } - -// pub struct RealFileSystem; - -// impl FileSystem for RealFileSystem { -// fn peek_executable(&self, path: &Path, buf: &mut [u8]) -> nix::Result { -// std::fs::File::open(path)?.read(buf) -// } -// } diff --git a/crates/fspy_shared_unix/src/exec/mod.rs b/crates/fspy_shared_unix/src/exec/mod.rs index d794b8ae..b76bae2e 100644 --- a/crates/fspy_shared_unix/src/exec/mod.rs +++ b/crates/fspy_shared_unix/src/exec/mod.rs @@ -1,4 +1,3 @@ -mod fs; mod shebang; mod which; diff --git a/crates/pty_terminal/Cargo.toml b/crates/pty_terminal/Cargo.toml index 9e2acba7..7bec6fc9 100644 --- a/crates/pty_terminal/Cargo.toml +++ b/crates/pty_terminal/Cargo.toml @@ -24,3 +24,10 @@ signal-hook = "0.3" [lints] workspace = true + +[lib] +test = false +doctest = false + +[package.metadata.cargo-shear] +ignored = ["ctor"] diff --git a/crates/pty_terminal_test/Cargo.toml b/crates/pty_terminal_test/Cargo.toml index f50a99e4..a830d4b8 100644 --- a/crates/pty_terminal_test/Cargo.toml +++ b/crates/pty_terminal_test/Cargo.toml @@ -22,3 +22,10 @@ subprocess_test = { workspace = true, features = ["portable-pty"] } [lints] workspace = true + +[lib] +test = false +doctest = false + +[package.metadata.cargo-shear] +ignored = ["ctor"] diff --git a/crates/pty_terminal_test_client/Cargo.toml b/crates/pty_terminal_test_client/Cargo.toml index 497478c4..3ac4e8ff 100644 --- a/crates/pty_terminal_test_client/Cargo.toml +++ b/crates/pty_terminal_test_client/Cargo.toml @@ -13,3 +13,7 @@ testing = [] [lints] workspace = true + +[lib] +test = false +doctest = false diff --git a/crates/subprocess_test/Cargo.toml b/crates/subprocess_test/Cargo.toml index b107ee9c..6d4f17fa 100644 --- a/crates/subprocess_test/Cargo.toml +++ b/crates/subprocess_test/Cargo.toml @@ -22,3 +22,6 @@ portable-pty = ["dep:portable-pty"] [lints] workspace = true + +[lib] +doctest = false diff --git a/crates/vite_glob/Cargo.toml b/crates/vite_glob/Cargo.toml index 90006a26..7bfa46cc 100644 --- a/crates/vite_glob/Cargo.toml +++ b/crates/vite_glob/Cargo.toml @@ -17,3 +17,6 @@ vite_str = { workspace = true } [lints] workspace = true + +[lib] +doctest = false diff --git a/crates/vite_graph_ser/Cargo.toml b/crates/vite_graph_ser/Cargo.toml index d149a13a..58acfe77 100644 --- a/crates/vite_graph_ser/Cargo.toml +++ b/crates/vite_graph_ser/Cargo.toml @@ -15,3 +15,6 @@ serde_json = { workspace = true } [lints] workspace = true + +[lib] +doctest = false diff --git a/crates/vite_path/Cargo.toml b/crates/vite_path/Cargo.toml index 7da9d22e..7b130463 100644 --- a/crates/vite_path/Cargo.toml +++ b/crates/vite_path/Cargo.toml @@ -25,3 +25,6 @@ workspace = true [dev-dependencies] assert2 = { workspace = true } + +[lib] +doctest = false diff --git a/crates/vite_select/Cargo.toml b/crates/vite_select/Cargo.toml index 6a344ae0..a86bee51 100644 --- a/crates/vite_select/Cargo.toml +++ b/crates/vite_select/Cargo.toml @@ -18,3 +18,6 @@ vite_str = { path = "../vite_str" } [dev-dependencies] assert2 = { workspace = true } + +[lib] +doctest = false diff --git a/crates/vite_shell/Cargo.toml b/crates/vite_shell/Cargo.toml index aab0afce..6a1a1993 100644 --- a/crates/vite_shell/Cargo.toml +++ b/crates/vite_shell/Cargo.toml @@ -17,3 +17,6 @@ vite_str = { workspace = true } [lints] workspace = true + +[lib] +doctest = false diff --git a/crates/vite_str/Cargo.toml b/crates/vite_str/Cargo.toml index ffa3b5db..7f3909a3 100644 --- a/crates/vite_str/Cargo.toml +++ b/crates/vite_str/Cargo.toml @@ -18,3 +18,6 @@ ts-rs = ["dep:ts-rs"] [lints] workspace = true + +[lib] +doctest = false diff --git a/crates/vite_task/Cargo.toml b/crates/vite_task/Cargo.toml index 8d33be3c..6fedfaa3 100644 --- a/crates/vite_task/Cargo.toml +++ b/crates/vite_task/Cargo.toml @@ -45,3 +45,6 @@ tempfile = { workspace = true } [target.'cfg(unix)'.dependencies] nix = { workspace = true } + +[lib] +doctest = false diff --git a/crates/vite_task_bin/Cargo.toml b/crates/vite_task_bin/Cargo.toml index 4477d37d..940f7afa 100644 --- a/crates/vite_task_bin/Cargo.toml +++ b/crates/vite_task_bin/Cargo.toml @@ -43,3 +43,7 @@ workspace = true [[test]] name = "e2e_snapshots" harness = false + +[lib] +test = false +doctest = false diff --git a/crates/vite_task_graph/Cargo.toml b/crates/vite_task_graph/Cargo.toml index e91a746a..52a80138 100644 --- a/crates/vite_task_graph/Cargo.toml +++ b/crates/vite_task_graph/Cargo.toml @@ -32,3 +32,6 @@ which = { workspace = true } [lints] workspace = true + +[lib] +doctest = false diff --git a/crates/vite_task_plan/Cargo.toml b/crates/vite_task_plan/Cargo.toml index cd314ac6..7ac860f9 100644 --- a/crates/vite_task_plan/Cargo.toml +++ b/crates/vite_task_plan/Cargo.toml @@ -47,3 +47,6 @@ vite_workspace = { workspace = true } [[test]] name = "plan_snapshots" harness = false + +[lib] +doctest = false diff --git a/crates/vite_tui/Cargo.toml b/crates/vite_tui/Cargo.toml index 7e067d21..76f5cae9 100644 --- a/crates/vite_tui/Cargo.toml +++ b/crates/vite_tui/Cargo.toml @@ -12,6 +12,7 @@ workspace = true [lib] doctest = false +test = false [dependencies] color-eyre = { workspace = true } diff --git a/crates/vite_workspace/Cargo.toml b/crates/vite_workspace/Cargo.toml index 9dd53ad8..b975f9fb 100644 --- a/crates/vite_workspace/Cargo.toml +++ b/crates/vite_workspace/Cargo.toml @@ -28,3 +28,6 @@ tempfile = { workspace = true } [lints] workspace = true + +[lib] +doctest = false diff --git a/justfile b/justfile index b742d34d..a70fcd45 100644 --- a/justfile +++ b/justfile @@ -9,7 +9,7 @@ _default: alias r := ready init: - cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear taplo-cli -y + cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear@1.11.1 taplo-cli -y pnpm run bootstrap-cli ready: