From c8639fe547e093ce5416e353e20b8ad5fde95f02 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Thu, 30 Apr 2020 21:43:31 +0200 Subject: [PATCH] Only run Flake8 on changed lines --- .pre-commit-config.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 096780d6..579d3c45 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,12 +11,10 @@ repos: - id: detect-private-key - id: end-of-file-fixer - id: trailing-whitespace - - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.9 - hooks: - id: flake8 - args: [--max-line-length=88] - language_version: python3.7 + name: Flake8 on commit diff + description: This hook limits Flake8 checks to changed lines of code. + entry: bash + args: [-c, 'git diff HEAD | flake8 --diff --max-line-length=88'] exclude: ^pelican/tests/output/