Add a contribution/lint guide

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2020-11-26 15:23:52 +01:00
parent 7fa647c953
commit ca3adb00ce
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
3 changed files with 18 additions and 1 deletions

5
Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM python:3.8-slim
RUN apt-get update \
&& apt-get install -y git \
&& apt-get autoclean \
&& pip install pre-commit

View file

@ -101,3 +101,16 @@ Variables replaced in the service template:
* `service_state` (= `$SERVICESTATE$`)
* `long_date_time` (= `$LONGDATETIME$`)
* `service_output` (= `$SERVICEOUTPUT$`)
## How to contribute
Contributions are welcomed! Feel free to update the code and create a pull-request.
Be sure to lint the code before:
```
docker build -t pre-commit .
docker run -it -v $(pwd):/mnt/ --rm pre-commit bash
# cd /mnt/
# pre-commit run --all-files
# exit
```

View file

@ -1,2 +1 @@
Add pre-commit Dockerfile and a doc to easily lint the code
Add requirements.txt file