From 8ae62207d96e85cc88693564f4c9b8439965bd34 Mon Sep 17 00:00:00 2001 From: Eeshu-Yadav Date: Mon, 15 Sep 2025 19:26:15 +0530 Subject: [PATCH] Add CI job to check copyright headers in Rust source files Signed-off-by: Eeshu-Yadav --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 283607c5..4c5c3b1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,17 @@ jobs: - name: Run clippy (fail on warnings) run: cargo clippy --all-targets --all-features + + - name: Check copyright headers + run: | + #!/bin/bash + set -e + find . -name "*.rs" -type f -not -path "./target/*" -not -path "./envoy-data-plane-api/*" | while read -r file; do + if ! head -1 "$file" | grep -q "Copyright"; then + echo "Missing copyright header in $file" + exit 1 + fi + done # Build and test that share artifacts build-and-test: