From 2bd05ff5d5ae4db164395ff1e72148e6168de4e8 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 14 Feb 2022 15:09:21 -0800 Subject: [PATCH 1/2] Add copyright check as pre-commit hook. --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1e1ad94ab0b..e0f8ca86c23 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,6 +88,10 @@ repos: # of dependencies, so we'll have to update this manually. additional_dependencies: - cmake-format==0.6.11 + - id: copyright-check + name: copyright-check + entry: python ./ci/checks/copyright.py --git-modified-only + language: python default_language_version: python: python3 From 0ca27063b8710c9148088e2b01d2a788fca0486e Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 14 Feb 2022 15:39:52 -0800 Subject: [PATCH 2/2] Don't use the copyright check in CI. --- .pre-commit-config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e0f8ca86c23..9e72c0119f3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -90,6 +90,9 @@ repos: - cmake-format==0.6.11 - id: copyright-check name: copyright-check + # This hook's use of Git tools appears to conflict with + # existing CI invocations so we don't invoke it during CI runs. + stages: [commit] entry: python ./ci/checks/copyright.py --git-modified-only language: python