Compare commits

...

4 Commits

Author SHA1 Message Date
Scott Morrison
3c2e5a5984 Merge remote-tracking branch 'origin/master' into copyright_headers 2024-02-20 17:46:58 +11:00
Scott Morrison
4fcd2e6475 only run on pull_request 2024-02-20 12:28:05 +11:00
Scott Morrison
19f14f3451 ignore ./nix 2024-02-20 12:27:06 +11:00
Scott Morrison
38564aa8d4 chore: CI checks for copyright headers 2024-02-20 12:25:41 +11:00

20
.github/workflows/copyright-header.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Check for copyright header
on: [pull_request]
jobs:
check-lean-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify .lean files start with a copyright header.
run: |
FILES=$(find . -type d \( -path "./tests" -o -path "./doc" -o -path "./src/lake/examples" -o -path "./src/lake/tests" -o -path "./build" -o -path "./nix" \) -prune -o -type f -name "*.lean" -exec perl -ne 'BEGIN { $/ = undef; } print "$ARGV\n" if !m{\A/-\nCopyright}; exit;' {} \;)
if [ -n "$FILES" ]; then
echo "Found .lean files which do not have a copyright header:"
echo "$FILES"
exit 1
else
echo "All copyright headres present!"
fi