From 6e0f6ec77a81a54685a9a4531677817827e5655f Mon Sep 17 00:00:00 2001 From: Lev Vereshchagin Date: Sun, 5 Dec 2021 19:09:08 +0300 Subject: [PATCH] Add guide to CONTRIBUTING.md --- CONTRIBUTING.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 31bc9f8a..83715779 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,12 +10,35 @@ On each PR that contains changes relevant to Docker builds, images are being bui > :evergreen_tree: Please be considerate when pushing commits and opening PR for multiple branches, as the process of building images uses energy and contributes to global warming. > + ## Lint +We use `pre-commit` framework to lint the codebase before committing. +First, you need to install pre-commit with pip: + ```shell -shellcheck example.sh +pip install pre-commit ``` +Also you can use brew if you're on Mac: + +```shell +brew install pre-commit +``` + +To setup _pre-commit_ hook, run: + +```shell +pre-commit install +``` + +To run all the files in repository, run: + +```shell +pre-commit run --all-files +``` + + ## Build ```shell