File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ txtred=' \e[0;31m'
6+ txtbld=' \e[1m'
7+ txtrst=' \e[0m'
8+
9+ if ! flake8 src/ po/
10+ then
11+ echo -e " ${txtred}${txtbld} Linter error(s) from flake8${txtrst} "
12+ exit 1
13+ fi
14+
15+ if ! mypy src/ po/
16+ then
17+ echo -e " ${txtred}${txtbld} Linter error(s) from mypy${txtrst} "
18+ exit 1
19+ fi
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414- Translation: update Portuguese translation (@hugok79 )
1515- Translation: add 'nl' in LINGUAS (@hugok79 )
1616- Update pypi packages (@MightyCreak )
17+ - Add pre-commit git hooks to run linters (@MightyCreak )
1718
1819## 0.9.0 - 2024-01-13
1920
Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ Diffuse depends on these projects:
1010* Meson
1111* Flatpak and Flatpak builder (Linux only)
1212
13+ ### Install git hooks (optional)
14+
15+ There is a pre-commit git hook that runs some linters on the source code before committing.
16+
17+ To install the git hooks (for the repository only), run this command:
18+
19+ ``` sh
20+ git config --local core.hooksPath ./.githooks
21+ ```
22+
1323## Install the dependencies
1424
1525### Install the system dependencies
You can’t perform that action at this time.
0 commit comments