From 3e2515b536ce40cce491b8cc7ae82a390b53b69a Mon Sep 17 00:00:00 2001 From: xdustinface Date: Sat, 27 Dec 2025 18:49:10 +0100 Subject: [PATCH] ci: exclude `dash-fuzz` from clippy on Windows `honggfuzz` doesn't support Windows, causing the `pre-commit` clippy step in #253 to fail. This excludes `dash-fuzz` from clippy on Windows only. --- .pre-commit-config.yaml | 2 +- contrib/run_clippy.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 contrib/run_clippy.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b3a2a6ec3..2cdae5c4d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -80,7 +80,7 @@ repos: - id: clippy name: clippy (workspace strict) description: Strict clippy on entire workspace - deny all warnings - entry: cargo clippy --workspace --all-features --all-targets -- -D warnings + entry: python3 contrib/run_clippy.py language: system types: [rust] pass_filenames: false diff --git a/contrib/run_clippy.py b/contrib/run_clippy.py new file mode 100755 index 000000000..9b3448896 --- /dev/null +++ b/contrib/run_clippy.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +"""Run clippy.""" + +import subprocess +import sys + +cmd = [ + "cargo", "clippy", + "--workspace", + "--all-features", + "--all-targets", +] + +# Exclude dash-fuzz on Windows (honggfuzz doesn't support Windows) +if sys.platform == "win32": + cmd.extend(["--exclude", "dash-fuzz"]) + +cmd.extend(["--", "-D", "warnings"]) + +sys.exit(subprocess.call(cmd))