You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -146,6 +146,51 @@ We do enforce some linting, testing and static type checking. This can and **sho
146
146
> [!TIP]
147
147
> In order to implement a new fix, it is best practice to use [local fixes](#local-fixes).
148
148
149
+
### Pre commit hooks
150
+
151
+
We have some [pre-commit hooks](https://pre-commit.com/) in place.
152
+
153
+
> [!TIP]
154
+
> This is the easiest way to check for any mistakes that need fixing before we can accept a pull request.
155
+
156
+
Install it:
157
+
158
+
```bash
159
+
pip install pre-commit
160
+
```
161
+
162
+
or on Arch / Manjaro:
163
+
164
+
```bash
165
+
sudo pacman -Sy pre-commit
166
+
```
167
+
168
+
To set up the hook in your work directory, run the following command:
169
+
170
+
```bash
171
+
pre-commit install
172
+
```
173
+
174
+
That's it.
175
+
The hook should include everything you need and install all the necessary packages in a [virtual environment](https://docs.python.org/3/library/venv.html).
176
+
177
+
You can also run them manually, without installing the hook:
178
+
179
+
```bash
180
+
pre-commit run
181
+
# or on all files, not only staged ones:
182
+
pre-commit run --all-files
183
+
```
184
+
185
+
----------
186
+
187
+
> [!NOTE]
188
+
> All of the following information is for documentation purposes only.
189
+
>
190
+
> The preferred way to check your contribution is to use [pre-commit hooks](#pre-commit-hooks).
191
+
192
+
----------
193
+
149
194
### Fix the package name
150
195
151
196
If you clone the repository, it will default to a directory named `umu-protonfixes`.
0 commit comments