Welcome to the development guide for husky-rs!
This document will walk you through setting up your development environment, running tests, building the project, and maintaining code quality.
- Setting Up the Development Environment
- Running Tests
- Building the Project
- Code Style and Linting
- Generating Documentation
-
Clone the Repository: Start by cloning the project repository to your local machine and navigate to the project directory:
git clone https://github.com/pplmx/husky-rs.git cd husky-rs -
Build the Project: This command compiles the project and its dependencies:
make build # Or: cargo build
Tests are crucial to ensure the stability of the project. To run all tests, use the following command:
make test
# Or: cargo testThis command will compile the code and run all tests, ensuring all components work as expected.
[Consider adding specific details on the structure of tests, testing strategy, or how to add new tests.]
To build the project in release mode, use:
make build
# Or: cargo build --releaseThis command will generate an optimized executable in the target/release directory.
Maintaining consistent code style is essential. We use rustfmt for formatting and clippy for linting.
To format your code, run:
make fmt
# Or: cargo fmtTo run the linter:
make clippy
# Or: cargo clippy --all-targets --all-features -- -D warningsThese commands will automatically check and optionally fix any code style issues according to the project's style guide.
To generate the project documentation, run:
make doc
# Or: cargo doc --no-depsThis will create the documentation for your project and its dependencies.
To clean up build artifacts and other generated files, you can use:
make clean
# Or: cargo cleanThis will remove the target directory and clean up any Docker-related resources.