diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c483214c1d8967c9922d9659f8d3c4f565bac041..2048df664941a1102734c3b9fb710043a820585e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,13 +34,10 @@ repos: - repo: meta hooks: - id: check-useless-excludes - - repo: local + - repo: https://gitlab.teklia.com/tools/pre-commit-hooks + rev: 0.1.0 hooks: - id: long-test-files - name: Warn about long unit test files - language: script - entry: ci/long-test-files.sh + args: ['1000'] # Only run on Arkindex unit test files files: '^arkindex\/[^\/]*\/tests\/(.*\/)?test_.*\.py' - # Always show output, even when the hook passes, since the hook only warns and doesn't fail - verbose: true diff --git a/ci/long-test-files.sh b/ci/long-test-files.sh deleted file mode 100755 index 0eac44393b2e74402f28e5d767fa4edff7dc8a8a..0000000000000000000000000000000000000000 --- a/ci/long-test-files.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -wc -l "$@" | awk '$2 != "total" && $1 > 1000 { OFS=""; print $2, " is too long (", $1, " lines)" }'