ci(pre-commit): config and docs (#942)

This commit is contained in:
Álex 2024-12-12 12:13:24 +01:00 committed by GitHub
parent 0ce53e7267
commit 0e273c3f44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 0 deletions

7
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,7 @@
repos:
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: clippy

33
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,33 @@
# Contributing to Nomos Node
We're glad you're interested in contributing to Nomos Node!
This document describes the guidelines for contributing to the project. We will be updating it as we grow and we figure
out what works best for us.
If you have any questions, come say hi to our [Discord](https://discord.gg/G6q8FgZq)!
## Running Pre-Commit Hooks
To ensure consistent code quality, we ask that you run the `pre-commit` hooks before making a commit.
These hooks help catch common issues early and applies common code style rules, making the review process smoother for
everyone.
1. Install the [pre-commit](https://pre-commit.com/) tool if you haven't already:
```bash
# On Fedora
sudo dnf install pre-commit
# On other systems
pip install pre-commit
```
2. Install the pre-commit hooks:
```bash
pre-commit install
```
3. That's it! The pre-commit hooks will now run automatically when you make a commit.