From 4057b8a2c81ea15200dec10f32a93e693a0eea4b Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Mon, 5 Jan 2026 03:08:27 +0100 Subject: [PATCH] Update .pre-commit-config.yaml (#7) Update to the pre-commit config. Only merge after one month of testing in an active repo Reviewed-on: https://git.horstenkamp.eu/Philipp/template-git/pulls/7 --- .pre-commit-config.yaml | 15 +++++++++++---- GEMINI.md | 17 ++++++++++++++--- README.md | 2 +- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 56c520a..f53aed8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,10 +2,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - - id: end-of-file-fixer - exclude: (.txt$|.ipynb$|README.md$|readme.mde$) - - id: trailing-whitespace - exclude: (.txt$|README.md$) # - id: check-yaml - id: check-json - id: check-toml @@ -74,6 +70,14 @@ repos: - id: prettier types_or: [css, javascript] +- repo: https://github.com/executablebooks/mdformat + rev: 1.0.0 # Check for the latest version + hooks: + - id: mdformat + # Important: The GFM plugin is required for table support + additional_dependencies: + - mdformat-gfm + - repo: https://github.com/python-jsonschema/check-jsonschema rev: 0.36.0 hooks: @@ -86,6 +90,7 @@ repos: - id: check-compose-spec - id: check-dependabot +# the following hooks should always be at the end fo the file since they may add to what other hooks do - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: @@ -93,3 +98,5 @@ repos: exclude: (.txt$|.ipynb$|README.md$|readme.mde$) - id: trailing-whitespace exclude: (.txt$|README.md$) + - id: mixed-line-ending + args: [--fix=lf] diff --git a/GEMINI.md b/GEMINI.md index 3e1eff8..2726b18 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -4,9 +4,20 @@ This document outlines some basic rules and guidelines for development within th ## Development Guidelines -* **Test-Driven Development (TDD):** Wherever possible, Test-Driven Development principles should be followed. Write tests before writing the code they are intended to validate. -* **Pre-commit Hooks:** Ensure that `pre-commit` hooks are installed and active before making any commits. This can be done by running `pre-commit install` in your local repository. +- **Test-Driven Development (TDD):** Wherever possible, Test-Driven Development principles should be followed. Write tests before writing the code they are intended to validate. +- **Pre-commit Hooks:** Ensure that `pre-commit` hooks are installed and active before making any commits. This can be done by running `pre-commit install` in your local repository. + +## Issue Management + +- **Closing Issues:** When a commit fixes or closes an issue, the commit message must include a supported keyword followed by the issue number (e.g., `fixes #123`, `closes #456`). + - Supported keywords: `close`, `closes`, `closed`, `fix`, `fixes`, `fixed`, `resolve`, `resolves`, `resolved`. + - **Placement:** This pattern should always be placed at the very end of the commit body (not the subject line). + +## PRs + +Do create PRs only on a specific user request. Do not create them on your own initiative. +A PR should always contain a note if an issue is closed with it. ## Repository Comparison -* On request, this repository should be compared against the rules and guidelines specified in the `README.md` of the reference repository: `https://git.horstenkamp.eu/Philipp/template-git`. +- On request, this repository should be compared against the rules and guidelines specified in the `README.md` of the reference repository: `https://git.horstenkamp.eu/Philipp/template-git`. The comparison should only move fitting changes to the current repo. diff --git a/README.md b/README.md index f104681..8cb528e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # template-git -A template for git repostories \ No newline at end of file +A template for git repostories