Skip to content

Latest commit

 

History

History
121 lines (82 loc) · 3.53 KB

CONTRIBUTING.md

File metadata and controls

121 lines (82 loc) · 3.53 KB

Contributing

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).

🛠️ Setting Up the Environment

⚙️ Requirements

Once your environment is ready, fork the repository, clone it locally, and set up the project.

📥 Cloning the Repository

Clone your fork of win32 to your local machine:

git clone https://github.com/<your-username>/win32.git

📦 Installing Dependencies

Navigate to the project directory and install dependencies:

cd win32
dart pub get

🧩 Setting Up Git Hooks

This project uses Lefthook to manage Git hooks. Install the hooks by running the following in the project root:

lefthook install

This will set up checks that automatically ensure code quality and consistency before commits.

🧪 Running Tests

To run tests for a specific package, navigate to its directory and run:

cd packages\<package-name>
dart test

🚀 Committing Your Work and Preparing a Pull Request

To maintain a consistent and clean codebase, we enforce coding standards and use tools to ensure high-quality contributions.

🎨 Coding Style

Please follow the Dart style guide to keep the codebase clean and consistent.

📜 Commit Convention

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 API
  • fix: 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.

🧩 Git Hooks

The following hooks run automatically with Lefthook:

  • Pre-Commit Hooks:

    • analyze: Checks code for style issues
    • format: Formats code according to Dart guidelines
    • test_ffi_leak_tracker: Runs tests for package:ffi_leak_tracker
    • test_filepicker_windows: Runs tests for package:filepicker_windows
    • test_generator: Runs tests for package:generator
    • test_win32: Runs tests for package:win32
    • test_win32_clipboard: Runs tests for package:win32_clipboard
    • test_win32_gamepad: Runs tests for package:win32_gamepad
    • test_win32_registry: Runs tests for package:win32_registry
    • test_win32_runner: Runs tests for package:win32_runner
    • test_winmd: Runs tests for package:winmd
  • Commit-msg Hook:

🔄 Creating a Pull Request

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! 🎉