From 34e3c59d17e6ab3f422bc6d1e1157ffd072239b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Thu, 18 Sep 2025 14:45:20 +0200 Subject: [PATCH] Separate out CONTRIBUTING section from README.md --- README.md | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/README.md b/README.md index 66aa41891f..100cd0ae78 100644 --- a/README.md +++ b/README.md @@ -91,42 +91,4 @@ The resulting file can be uploaded to for instance gist.github.com. CONTRIBUTING ------------ -We welcome contributions to the OPM Simulators project! To ensure code quality and consistency, we recommend using automated formatting tools. - -### Pre-commit Hooks (Recommended) - -We provide pre-commit hooks that automatically format your code before each commit: - -**Setup:** -1. Install pre-commit: - ```bash - pip install pre-commit - # or: conda install -c conda-forge pre-commit - # or: apt install pre-commit (Ubuntu/Debian) - # or: brew install pre-commit (macOS) - ``` - -2. Install hooks in your local repository: - ```bash - pre-commit install - ``` - -**What it does:** -- Removes trailing whitespace (preserves Markdown line breaks) -- Ensures files end with exactly one newline -- Runs automatically on every commit -- Supports C/C++, Python, shell scripts, YAML, CMake, and Markdown files - -**Manual usage:** -```bash -# Run on all files -pre-commit run --all-files - -# Skip hooks for a specific commit -git commit --no-verify - -# Update hook versions -pre-commit autoupdate -``` - -This automated formatting helps maintain consistent code style and reduces review time by catching formatting issues before they reach code review. +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to this project.