From a76fa882348ffc7575f54880eb24c8e2adab5547 Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Sun, 4 May 2025 16:38:37 +0200 Subject: [PATCH 1/3] Add minimal pre-commit config file --- .pre-commit-config.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..40ea118 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +ci: + autoupdate_schedule: monthly + +exclude: "tests/templates/invalid.txt" + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-json + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + - id: end-of-file-fixer + - id: trailing-whitespace + - id: fix-byte-order-marker From 336a9ed2ef372f7b426ea123e431ea9e257549af Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Thu, 1 May 2025 12:28:01 +0200 Subject: [PATCH 2/3] Add a minimal contributing guide --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3490651 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,12 @@ +# Contributing to django-rusty-templates + +## Prerequisites + +django-rusty-templates is written in Rust, so you'll need to install the +[Rust toolchain](https://www.rust-lang.org/tools/install). + +You can optionally install [pre-commit](https://pre-commit.com/#installation) hooks to automatically run some validation checks when making a commit: +```shell +pip install pre-commit +pre-commit install +``` From 651beb17251fdb3df87ba45f94a4e4e8a69e45d7 Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Sun, 4 May 2025 16:39:07 +0200 Subject: [PATCH 3/3] Fix error reported by `pre-commit run --all-files` --- .github/workflows/python.yml | 1 - tests/templates/full_example.html | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 76c0741..36b0d94 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -53,4 +53,3 @@ jobs: with: files: coverage.xml, codecov.json fail_ci_if_error: true - diff --git a/tests/templates/full_example.html b/tests/templates/full_example.html index e5cff1a..e33061d 100644 --- a/tests/templates/full_example.html +++ b/tests/templates/full_example.html @@ -21,4 +21,3 @@

-