Skip to content

Commit

Permalink
Detect missing files in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Nov 28, 2021
1 parent 9b1d29d commit 9ec29b1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ jobs:
# Python 3.9.8+, and we can't bump black without reformatting.
python-version: "3.10"
- uses: pre-commit/action@v2.0.0
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
if [ "$newfiles" != "" ] ; then
echo "Please check-in the following files: $newfiles"
exit 1
fi

0 comments on commit 9ec29b1

Please sign in to comment.