Thank you for your interest in contributing to this project!
For contributing to package:win32, please refer to the Contributing guide
for detailed contribution guidelines (coding style, pull request process,
documentation, and more).
Once your environment is ready, fork the repository, clone it locally, and set up the project.
Clone your fork of win32 to your local machine:
git clone https://github.com/<your-username>/win32.gitNavigate to the project directory and install dependencies:
cd win32
dart pub getThis project uses Lefthook to manage Git hooks. Install the hooks by running the following in the project root:
lefthook installThis will set up checks that automatically ensure code quality and consistency before commits.
To run tests for a specific package, navigate to its directory and run:
cd packages\<package-name>
dart testTo maintain a consistent and clean codebase, we enforce coding standards and use tools to ensure high-quality contributions.
Please follow the Dart style guide to keep the codebase clean and consistent.
We use Conventional Commits to structure our commit messages for clarity and uniformity.
Please use the following format for commit messages:
<type>(optional scope): <description>
Examples:
feat: add DragQueryFile APIfix: resolve an issue with the PROPVARIANT struct
Commit messages are validated with a GitHub action, so be sure to use the correct format when making a pull request.
The following hooks run automatically with Lefthook:
-
Pre-Commit Hooks:
analyze: Checks code for style issuesformat: Formats code according to Dart guidelinestest_ffi_leak_tracker: Runs tests forpackage:ffi_leak_trackertest_filepicker_windows: Runs tests forpackage:filepicker_windowstest_generator: Runs tests forpackage:generatortest_win32: Runs tests forpackage:win32test_win32_clipboard: Runs tests forpackage:win32_clipboardtest_win32_gamepad: Runs tests forpackage:win32_gamepadtest_win32_registry: Runs tests forpackage:win32_registrytest_win32_runner: Runs tests forpackage:win32_runnertest_winmd: Runs tests forpackage:winmd
-
Commit-msg Hook:
check_commit: Ensures the commit message follows Conventional Commits
After committing your changes, push them to your fork and create a pull request. When you open a pull request, tests will run automatically, and our maintainers will review it.
Please use the pull request template to provide details about your changes, ensuring a smoother review process.
Thank you for contributing to this project! 🎉