-
Notifications
You must be signed in to change notification settings - Fork 8
ci: exclude dash-fuzz from clippy on Windows
#320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v0.41-dev
Are you sure you want to change the base?
Conversation
`honggfuzz` doesn't support Windows, causing the `pre-commit` clippy step in #253 to fail. This excludes `dash-fuzz` from clippy on Windows only.
📝 WalkthroughWalkthroughThe clippy pre-commit hook was refactored from a direct cargo invocation to use a Python wrapper script. The new script orchestrates cargo clippy with feature flags, handles platform-specific exclusions for dash-fuzz on Windows, and enforces warnings-as-errors linting. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
contrib/run_clippy.py (1)
1-20: LGTM! Clean implementation of the platform-specific exclusion.The script correctly orchestrates cargo clippy with the required flags and conditionally excludes
dash-fuzzon Windows. The command construction matches the workspace linting requirements from learnings.Regarding the static analysis hint (S603): this is a false positive. All command arguments are hardcoded strings, and
sys.platformis a trusted system property, not user input.Optional: Consider subprocess.run() for modern Python
While
subprocess.call()works correctly,subprocess.run()is the recommended API in Python 3.5+:-sys.exit(subprocess.call(cmd)) +sys.exit(subprocess.run(cmd).returncode)This is purely stylistic and not necessary.
Based on learnings, this approach ensures clippy runs with
-D warningsto avoid warnings in CI.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.pre-commit-config.yamlcontrib/run_clippy.py
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-22T17:59:51.097Z
Learning: Applies to **/*.rs : Run `cargo clippy --workspace --all-targets -- -D warnings` for linting; avoid warnings in CI
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-22T17:59:37.849Z
Learning: Applies to **/*.rs : Pass clippy linting without warnings
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-22T17:59:51.097Z
Learning: Run pre-PR checks: `cargo fmt`, `cargo clippy`, `cargo test` (workspace) before submitting pull requests
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: dash-spv/CLAUDE.md:0-0
Timestamp: 2025-12-16T09:03:55.811Z
Learning: Run 'cargo fmt --check' to verify formatting, 'cargo clippy --all-targets --all-features -- -D warnings' for linting, and 'cargo check --all-features' to verify all features compile
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-22T17:59:51.097Z
Learning: Applies to **/*.rs : Format code with `rustfmt` before commits; ensure `cargo fmt --all` is run
📚 Learning: 2025-12-22T17:59:51.097Z
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-22T17:59:51.097Z
Learning: Applies to **/*.rs : Run `cargo clippy --workspace --all-targets -- -D warnings` for linting; avoid warnings in CI
Applied to files:
contrib/run_clippy.py.pre-commit-config.yaml
📚 Learning: 2025-12-22T17:59:37.849Z
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-22T17:59:37.849Z
Learning: Applies to **/*.rs : Pass clippy linting without warnings
Applied to files:
contrib/run_clippy.py.pre-commit-config.yaml
📚 Learning: 2025-12-16T09:03:55.811Z
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: dash-spv/CLAUDE.md:0-0
Timestamp: 2025-12-16T09:03:55.811Z
Learning: Run 'cargo fmt --check' to verify formatting, 'cargo clippy --all-targets --all-features -- -D warnings' for linting, and 'cargo check --all-features' to verify all features compile
Applied to files:
contrib/run_clippy.py
📚 Learning: 2025-12-22T17:59:51.097Z
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-22T17:59:51.097Z
Learning: Run pre-PR checks: `cargo fmt`, `cargo clippy`, `cargo test` (workspace) before submitting pull requests
Applied to files:
contrib/run_clippy.py.pre-commit-config.yaml
🪛 Ruff (0.14.10)
contrib/run_clippy.py
20-20: subprocess call: check for execution of untrusted input
(S603)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
- GitHub Check: Core Components Tests
- GitHub Check: SPV Components Tests
- GitHub Check: RPC Tests (stable, true)
- GitHub Check: fuzz (hashes_sha512)
- GitHub Check: fuzz (hashes_ripemd160)
- GitHub Check: fuzz (dash_deserialize_script)
- GitHub Check: fuzz (hashes_sha256)
- GitHub Check: fuzz (hashes_json)
- GitHub Check: fuzz (dash_deserialize_block)
- GitHub Check: fuzz (hashes_sha512_256)
- GitHub Check: fuzz (hashes_sha1)
- GitHub Check: fuzz (dash_script_bytes_to_asm_fmt)
- GitHub Check: fuzz (hashes_cbor)
- GitHub Check: fuzz (dash_outpoint_string)
- GitHub Check: fuzz (dash_deser_net_msg)
- GitHub Check: fuzz (dash_deserialize_amount)
- GitHub Check: fuzz (dash_deserialize_address)
- GitHub Check: fuzz (dash_deserialize_witness)
- GitHub Check: Pre-commit (macos-latest)
- GitHub Check: Pre-commit (ubuntu-latest)
🔇 Additional comments (1)
.pre-commit-config.yaml (1)
83-83: LGTM! Proper delegation to the Python wrapper.The change correctly delegates clippy execution to the new
contrib/run_clippy.pyscript, which handles the platform-specific exclusion logic while preserving the same clippy flags and behavior on non-Windows platforms.Based on learnings, this maintains the requirement to run
cargo clippy --workspace --all-targets -- -D warningsfor linting.
honggfuzzdoesn't support Windows, causing thepre-commitclippy step in #253 to fail. This excludesdash-fuzzfrom clippy on Windows only.Summary by CodeRabbit
Chores
✏️ Tip: You can customize this high-level summary in your review settings.