From a434afa560a234ba15a030c7a4ecd0aaa6d6a390 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 21 Feb 2023 10:21:13 +0000 Subject: [PATCH] Add a pre-commit config file The easiest way to install these pre-commit hooks is by running `pip install --user pre-commit && pre-commit install` The current checks are quite basic and only check that the changed files don't have trailing whitespace and have valid line endings. --- .pre-commit-config.yaml | 14 ++++++++++++++ 1 file changed, 14 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 00000000..38b9add0 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +exclude: "^sail_latex_riscv/.*" +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - id: mixed-line-ending + args: [ "--fix=lf" ] + - id: check-case-conflict