From 50f0361b91a62f2dc62e4c40580572e7ad0adad8 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Mon, 15 Jan 2018 18:22:11 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20de=20l'environnement=20de?= =?UTF-8?q?=20d=C3=A9veloppement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ dev-requirements.txt | 5 +++++ 2 files changed, 45 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 dev-requirements.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..1db747f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,40 @@ +# See http://pre-commit.com for more information +# See http://pre-commit.com/hooks.html for more hooks +repos: + - repo: git://github.com/asottile/reorder_python_imports + sha: v0.3.5 + hooks: + - id: reorder-python-imports + - repo: https://github.com/pre-commit/mirrors-yapf + sha: v0.18.0 + hooks: + - id: yapf + - repo: https://github.com/pre-commit/pre-commit-hooks + sha: v0.9.2 + hooks: + - id: trailing-whitespace + name: Supprime espaces fin de ligne + files: .py$ + - id: end-of-file-fixer + name: Règle problème sur les fins de fichiers + - id: check-yaml + name: Syntaxe des fichiers YAML + - id: check-json + name: Syntaxe des fichiers JSON + - id: debug-statements + name: Supprime les PDB restants + - id: detect-private-key + name: Trouve les clefs privées + - id: flake8 + name: Vérification code Python avec flake8 + args: ["--exclude=.git, __pycache__"] + - id: requirements-txt-fixer + name: Réordonne le fichier requirements.txt + - repo: https://github.com/pre-commit/mirrors-jshint + sha: v2.9.5 + hooks: + - id: jshint + - repo: https://github.com/Lucas-C/pre-commit-hooks-safety + sha: v1.1.0 + hooks: + - id: python-safety-dependencies-check diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..99277ba --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,5 @@ +-r requirements.txt +flake8 +pre-commit +pylint +pylint_django