feat: IO #85
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
name: Check for copyright headers | |
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 f -name "*.lean" -not -path "./.lake/*" -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 headers present." | |
fi |