From 115b05432887a435fbe7c890dac2d76526e4e44e Mon Sep 17 00:00:00 2001 From: leynos Date: Wed, 8 Jul 2026 12:34:49 +0200 Subject: [PATCH 1/4] Fix pre-existing formatting and Markdown lint failures Add the missing trailing newline to src/lib.rs so that `cargo fmt --check` passes, and collapse a double blank line in AGENTS.md that tripped markdownlint's MD012 rule. Both failures predate this branch and block the lint gates that the Whitaker adoption relies upon. --- AGENTS.md | 1 - src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index d156dd0..481ff3f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -202,7 +202,6 @@ project: ### Testing - - Use `rstest` fixtures for shared setup. - Replace duplicated tests with `#[rstest(...)]` parameterized cases. - Prefer `mockall` for ad hoc mocks/stubs. diff --git a/src/lib.rs b/src/lib.rs index ad726f8..3c7216c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,4 +5,4 @@ #[must_use] pub const fn greet() -> &'static str { "Hello from YTMusic WASM Plugin for IronClaw!" -} \ No newline at end of file +} From 18991e44f011fa81139eb201859b660b7e019f57 Mon Sep 17 00:00:00 2001 From: leynos Date: Wed, 8 Jul 2026 12:34:49 +0200 Subject: [PATCH 2/4] Adopt the Whitaker Dylint suite in the lint gate and CI Extend the `lint` Makefile target to run the Whitaker Dylint suite after Clippy, denying warnings via the existing RUST_FLAGS convention, with a WHITAKER variable alongside the other tool variables for overriding. In CI, cache the whitaker-installer binary and the cargo-binstall download cache, install whitaker-installer 0.2.5 via cargo binstall (provided by the shared setup-rust action), and run the installer before the lint step so that `make lint` exercises the suite. The suite reported no findings for this crate. --- .github/workflows/ci.yml | 16 ++++++++++++++++ Makefile | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 552feed..07768fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ jobs: env: CARGO_TERM_COLOR: always BUILD_PROFILE: debug + WHITAKER_INSTALLER_VERSION: '0.2.5' steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - name: Setup Rust @@ -26,6 +27,21 @@ jobs: **/*.md !**/target/** !**/dist/** + - name: Cache whitaker-installer + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: | + ~/.cargo/bin/whitaker-installer + ~/.cache/cargo-binstall + key: whitaker-installer-${{ runner.os }}-${{ runner.arch }}-${{ env.WHITAKER_INSTALLER_VERSION }} + - name: Install Whitaker Dylint suite + run: | + if command -v whitaker-installer >/dev/null 2>&1; then + echo "whitaker-installer already present; skipping cargo binstall" + else + cargo binstall --no-confirm whitaker-installer@${{ env.WHITAKER_INSTALLER_VERSION }} + fi + whitaker-installer - name: Lint run: make lint - name: Test and Measure Coverage diff --git a/Makefile b/Makefile index f744ec3..f344cd0 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ CLIPPY_FLAGS ?= $(CARGO_FLAGS) -- $(RUST_FLAGS) TEST_FLAGS ?= $(CARGO_FLAGS) MDLINT ?= markdownlint-cli2 NIXIE ?= nixie +WHITAKER ?= whitaker build: target/debug/$(TARGET) ## Build debug binary release: target/release/$(TARGET) ## Build release binary @@ -26,9 +27,10 @@ test: ## Run tests with warnings treated as errors target/%/$(TARGET): ## Build binary in debug or release mode $(CARGO) build $(BUILD_JOBS) $(if $(findstring release,$(@)),--release) -lint: ## Run Clippy with warnings denied +lint: ## Run Clippy and the Whitaker Dylint suite with warnings denied RUSTDOCFLAGS="$(RUSTDOC_FLAGS)" $(CARGO) doc --no-deps $(CARGO) clippy $(CLIPPY_FLAGS) + RUSTFLAGS="$(RUST_FLAGS)" $(WHITAKER) --all -- $(CARGO_FLAGS) fmt: ## Format Rust and Markdown sources $(CARGO) fmt --all From c59619731b47d605676273829f6ef2ed1ba2c483 Mon Sep 17 00:00:00 2001 From: leynos Date: Wed, 8 Jul 2026 12:41:19 +0200 Subject: [PATCH 3/4] Fall back to cargo install when cargo-binstall is unavailable The pinned shared `setup-rust` action in this repository predates binstall provisioning, so the Whitaker install step failed with "no such command: `binstall`". Try binstall first and build the installer from crates.io otherwise; the cached binary makes the fallback a one-off cost. --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07768fa..13d3ac4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,10 +36,13 @@ jobs: key: whitaker-installer-${{ runner.os }}-${{ runner.arch }}-${{ env.WHITAKER_INSTALLER_VERSION }} - name: Install Whitaker Dylint suite run: | - if command -v whitaker-installer >/dev/null 2>&1; then - echo "whitaker-installer already present; skipping cargo binstall" - else - cargo binstall --no-confirm whitaker-installer@${{ env.WHITAKER_INSTALLER_VERSION }} + if ! command -v whitaker-installer >/dev/null 2>&1; then + if cargo binstall --version >/dev/null 2>&1; then + cargo binstall --no-confirm whitaker-installer@${{ env.WHITAKER_INSTALLER_VERSION }} + else + echo "cargo-binstall unavailable; building whitaker-installer from crates.io" + cargo install --locked whitaker-installer --version ${{ env.WHITAKER_INSTALLER_VERSION }} + fi fi whitaker-installer - name: Lint From 203bbc2a65cf79fbef6ccbe971700703aa25b989 Mon Sep 17 00:00:00 2001 From: leynos Date: Wed, 8 Jul 2026 13:23:22 +0200 Subject: [PATCH 4/4] Harden the Whitaker install step Pass WHITAKER_INSTALLER_VERSION to the run block through the shell environment rather than inline `${{ env }}` template expansion, which zizmor flags as a template-injection risk; the job-level `env:` block already exports the variable. Add `--locked` to the cargo binstall invocation so that its compile-from-source fallback resolves dependencies from the published lockfile, keeping fallback builds reproducible. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13d3ac4..e7569e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,10 +38,10 @@ jobs: run: | if ! command -v whitaker-installer >/dev/null 2>&1; then if cargo binstall --version >/dev/null 2>&1; then - cargo binstall --no-confirm whitaker-installer@${{ env.WHITAKER_INSTALLER_VERSION }} + cargo binstall --no-confirm --locked "whitaker-installer@${WHITAKER_INSTALLER_VERSION}" else echo "cargo-binstall unavailable; building whitaker-installer from crates.io" - cargo install --locked whitaker-installer --version ${{ env.WHITAKER_INSTALLER_VERSION }} + cargo install --locked whitaker-installer --version "${WHITAKER_INSTALLER_VERSION}" fi fi whitaker-installer