From f54f3b69dcd7f458fd0989a9e48eba0e0d58039a Mon Sep 17 00:00:00 2001 From: Albertas Gimbutas Date: Sat, 10 Aug 2024 18:08:12 +0300 Subject: [PATCH] Add pre-commit hook example to README --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 53bf2c7..821c051 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,19 @@ ignore-names = ["BaseTestCase", "*Mixin"] ignore-names-in-files = ["migrations"] ``` +## Pre-commit hook +Create a `.pre-commit-config.yaml` file in the root of the project directory, if it doesn't exist, and add the following to the file: + +``` +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/albertas/deadcode + rev: 2.4.1 + hooks: + - id: deadcode +``` + ## Command line options | Option                                    | Type | Meaning |