-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vincent Pizzo
committed
Jul 16, 2024
1 parent
bcf2166
commit b488d8c
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/pre-commit | ||
rev: v2.17.0 | ||
hooks: | ||
- id: validate_manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- id: codeowners-cli | ||
name: codeowners-cli | ||
description: Runs codeowners-cli to list or validate code owners. | ||
entry: hooks/codeowners-cli-pre-commit | ||
language: script | ||
require_serial: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
if ! command -v clj-kondo &> /dev/null | ||
then | ||
echo "codeowners-cli could not be found. Please follow the installation instructions here https://github.com/vincentjames501/codeowners-cli?tab=readme-ov-file#getting-started." | ||
exit 2 | ||
fi | ||
|
||
if !(codeowners-cli $@) | ||
then | ||
echo | ||
echo "Error: new CODEOWNErS errors found. Please fix them and retry the commit." | ||
exit 1 | ||
fi |