From 4774d30934dd9877d253670480bdae7bfd4503a5 Mon Sep 17 00:00:00 2001 From: Dakshin Devanand Date: Thu, 8 May 2025 00:24:08 -0500 Subject: [PATCH] doc: update contributing guidelines wrt pre-commit/devtool Point external contributors to use devtool instead of unmaintained pre-commit script to check code quality/style. Signed-off-by: Dakshin Devanand --- CONTRIBUTING.md | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c83b634fcb6..e46898823f5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,39 +57,23 @@ If you just want to receive feedback for a contribution proposal, open an “RFC ## Contribution Quality Standards Most quality and style standards are enforced automatically during integration -testing. For ease of use you can setup a git pre-commit hook by running the -following in the Firecracker root directory: +testing. To run these quality and style checks, use `devtool`. -``` -cargo install rusty-hook -rusty-hook init -``` - -This project also has linters for Python and Markdown. These will be called by -the pre-commit when you modify any Python and Markdown files. In order to make -sure you are setup we recommend you install -[poetry](https://python-poetry.org/docs/) and -[pyenv](https://github.com/pyenv/pyenv?tab=readme-ov-file#installation). - -Poetry is used by this project and pyenv will help you make sure you have a -Python version compatible with the poetry python project we use as part of -`./tools/devctr`. - -Once you have these two installed you can run the following to install the dev -container poetry project: +```bash +# Format code (Rust, Python, Markdown) +./tools/devtool fmt +# Check code style and lint warnings +./tools/devtool checkstyle ``` -poetry -C ./tools/devctr install --no-root -``` - -Then, you can activate the poetry virtual environment by running: -``` -poetry shell -C ./tools/devctr -``` +Refer to [docs/getting-started.md](docs/getting-started.md) and run +`tools/devtool --help` for more information on `devtool`, such as build +verification, tests, etc. -Which you will need to do after modifying python or markdown files so that the -pre-commit can finish successfully. +> **Note:** The legacy rusty-hook pre-commit script has been deprecated and is +> unmaintained. Please use `devtool` for formatting, linting, and build checks +> during your development cycle. Your contribution needs to meet the following standards: