Skip to content

Commit e2d3c1a

Browse files
author
Hugo Osvaldo Barrera
committed
Add pre-commit hooks with some basic linting
Mostly to keep an eye on code quality as I move forward.
1 parent b4bbc59 commit e2d3c1a

File tree

9 files changed

+25
-10
lines changed

9 files changed

+25
-10
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
args: [--markdown-linebreak-ext=md]
7+
- id: end-of-file-fixer
8+
- id: check-toml
9+
- id: check-added-large-files
10+
- id: debug-statements
11+
- repo: https://gitlab.com/pycqa/flake8
12+
rev: "master" # pick a git hash / tag to point to
13+
hooks:
14+
- id: flake8
15+
additional_dependencies: [flake8-import-order, flake8-bugbear]

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@
6969
"make -e $BUILD"
7070
],
7171
"sudo": true
72-
}
72+
}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ install-test: install-servers install-dev
8383

8484
install-style: install-docs install-dev
8585
pip install -U flake8 flake8-import-order flake8-bugbear autopep8
86-
86+
8787
style:
8888
flake8
8989
! git grep -i syncroniz */*

docs/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.. include:: ../CHANGELOG.rst
1+
.. include:: ../CHANGELOG.rst

docs/config.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Service to hardcode those into opensource software [googleterms]_:
286286

287287
3. In the sidebar, select "Credentials" and create a new "OAuth Client ID". The
288288
application type is "Other".
289-
289+
290290
You'll be prompted to create a OAuth consent screen first. Fill out that
291291
form however you like.
292292

@@ -368,7 +368,7 @@ password. Neither are stored.
368368
secrets_dir = ...
369369
#server_path = ...
370370
#db_path = ...
371-
371+
372372
:param email: The email address of your account.
373373
:param secrets_dir: A directory where vdirsyncer can store the encryption
374374
key and authentication token.
@@ -386,7 +386,7 @@ password. Neither are stored.
386386
secrets_dir = ...
387387
#server_path = ...
388388
#db_path = ...
389-
389+
390390
:param email: The email address of your account.
391391
:param secrets_dir: A directory where vdirsyncer can store the encryption
392392
key and authentication token.

docs/keyring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ passwords from the OS's password store. Installation::
6060
Basic usage::
6161

6262
password.fetch = ["command", "keyring", "get", "example.com", "foouser"]
63-
63+
6464
.. _keyring: https://github.com/jaraco/keyring/
6565

6666
Password Prompt

docs/tutorials/claws-mail.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Then search for the for the vCard in the folder **~/.contacts/**. Click
7777
ok, and you we will see your contacts.
7878

7979
.. note::
80-
80+
8181
Claws-Mail shows only contacts that have a mail address.
8282

8383
Crontab

docs/when.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ program chosen:
3939
* Like with ``todo.txt``, Dropbox and friends are obviously agnostic/unaware of
4040
the files' contents. If a file has changed on both sides, Dropbox just copies
4141
both versions to both sides.
42-
42+
4343
This is a good idea if the user is directly interfacing with the file system
4444
and is able to resolve conflicts themselves. Here it might lead to
4545
erroneous behavior with e.g. ``khal``, since there are now two events with

scripts/dpkg.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG distrover
99
RUN apt-get update
1010
RUN apt-get install -y build-essential fakeroot debhelper git
1111
RUN apt-get install -y python3-all python3-pip
12-
RUN apt-get install -y ruby ruby-dev
12+
RUN apt-get install -y ruby ruby-dev
1313
RUN apt-get install -y python-all python-pip
1414

1515
RUN gem install fpm

0 commit comments

Comments
 (0)