diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..b0547905 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.1.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace diff --git a/Jenkinsfile b/Jenkinsfile index a229fa51..55225a81 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1 +1,10 @@ +node('linux') { + stage('pre-commit') { + infra.checkout() + sh '''#!/bin/sh -eux + curl https://pre-commit.com/install-local.py | python - + "$HOME/bin/pre-commit" run --all-files + ''' + } +} buildPlugin()