-
Notifications
You must be signed in to change notification settings - Fork 101
ci: enforce clippy in examples folder #517
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: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This pull request introduces improved error handling for file system operations and enforces clippy linting on example projects in CI. The changes focus on providing better error context for I/O failures and ensuring code quality consistency across the codebase.
- Introduces new
IoErrorandIoErrorMetadatatypes to wrapstd::io::Errorwith additional file path context - Refactors file system operations throughout the codebase to use enhanced error handling
- Updates CI workflow to lint example projects using Cargo Make
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/sample-wdm-driver/src/lib.rs | Updates imports and improves memory safety with &raw mut syntax |
| examples/sample-umdf-driver/src/lib.rs | Uses &raw mut syntax and simplifies size calculation |
| examples/sample-kmdf-driver/src/lib.rs | Uses &raw mut syntax and simplifies size calculation |
| crates/wdk-sys/build.rs | Adds feature-gated compilation and enhanced I/O error handling |
| crates/wdk-build/src/utils.rs | Updates error handling to use new IoError types |
| crates/wdk-build/src/lib.rs | Introduces new error types and refactors path validation logic |
| crates/wdk-build/src/cargo_make.rs | Enhances file operations with better error context |
| .github/workflows/lint.yaml | Adds Cargo Make installation and example project linting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Melvin Wang <[email protected]>
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.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
blocked on #480 |
This pull request introduces improved error handling and context for file system operations in the
wdk-buildcrate, refactors path validation logic for include and library directories, and updates the CI workflow to lint example projects using Cargo Make. The most important changes are grouped below:Error Handling Improvements
IoErrorandIoErrorMetadatato wrapstd::io::Errorwith additional context about the file system paths involved in I/O failures, and updatedConfigErrorto use these types for better diagnostics. [1] [2]crates/wdk-build/src/cargo_make.rsand related code to use the new error types, providing richer error information for failures in directory creation, file copying, symlink creation, and path canonicalization. [1] [2] [3] [4] [5]Path Validation Refactoring
validate_and_add_include_path, reducing code duplication and ensuring consistent error reporting for include and library paths in theConfigstruct. [1] [2] [3] [4] [5]CI Workflow Enhancement
.github/workflows/lint.yamlto install Cargo Make and add a linting step for example projects usingcargo make clippy, ensuring that example code is checked for lint issues in CI.Minor Codebase Improvements
crates/wdk-build/src/lib.rsto include new types and paths required for enhanced error handling.ucx_header.