Skip to content

Commit 8ae6220

Browse files
committed
Add CI job to check copyright headers in Rust source files
Signed-off-by: Eeshu-Yadav <eeshuyadav123@gmail.com>
1 parent 59adc36 commit 8ae6220

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ jobs:
4545

4646
- name: Run clippy (fail on warnings)
4747
run: cargo clippy --all-targets --all-features
48+
49+
- name: Check copyright headers
50+
run: |
51+
#!/bin/bash
52+
set -e
53+
find . -name "*.rs" -type f -not -path "./target/*" -not -path "./envoy-data-plane-api/*" | while read -r file; do
54+
if ! head -1 "$file" | grep -q "Copyright"; then
55+
echo "Missing copyright header in $file"
56+
exit 1
57+
fi
58+
done
4859
4960
# Build and test that share artifacts
5061
build-and-test:

0 commit comments

Comments
 (0)