aboutsummaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-03-04 19:27:04 -0800
committerGravatar MarkKoz <[email protected]>2020-03-04 19:47:49 -0800
commit5ed6e71fed014759ef07399ecb25eb7538b1d5ae (patch)
treec73fc0fd5b3f9218263601ba2a499404cf975e6d /.pre-commit-config.yaml
parentUpdate dev dependencies (diff)
Add more pre-commit hooks
Hooks added: * check-merge-conflict - checks for files with merge conflict strings * check-toml - attempts to load all toml files to verify syntax * check-yaml - attempts to load all yaml files to verify syntax * end-of-file-fixer - ensures files end in a newline and only a newline * mixed-line-ending - replaces mixed line endings with LF * trailing-whitespace - trims trailing whitespace * python-check-blanket-noqa - enforces that noqa annotations always occur with specific codes Changes made to comply with new hooks: * Remove trailing whitespaces * Remove some useless noqa annotations * Specify errors for noqa annotations * Add missing newlines at end of files See: python-discord/organisation#138
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml23
1 files changed, 19 insertions, 4 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 86035786..be57904e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,10 +1,25 @@
repos:
-- repo: local
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v2.5.0
hooks:
- - id: flake8
+ - id: check-merge-conflict
+ - id: check-toml
+ - id: check-yaml
+ - id: end-of-file-fixer
+ - id: mixed-line-ending
+ args: [--fix=lf]
+ - id: trailing-whitespace
+ args: [--markdown-linebreak-ext=md]
+ - repo: https://github.com/pre-commit/pygrep-hooks
+ rev: v1.5.1
+ hooks:
+ - id: python-check-blanket-noqa
+ - repo: local
+ hooks:
+ - id: flake8
name: Flake8
description: This hook runs flake8 within our project's pipenv environment.
- entry: pipenv run lint
+ entry: pipenv run flake8
language: python
types: [python]
- require_serial: true \ No newline at end of file
+ require_serial: true