Skip to content

Commit

Permalink
Include Java sources in license-header validation (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-bader authored Aug 2, 2021
1 parent 052dfe8 commit 36242b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script/ensure_license_headers.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

LINES="$(grep -E "Copyright \((c|C)\)" -rL --include=\*.kt --exclude-dir=generated-src --exclude-dir=projects .)"
STR_LEN=${#LINES}
if (( $STR_LEN > 0 )); then
LINES="$(grep -E "Copyright \((c|C)\)" -rL --include=\*.kt --include=\*.java --exclude-dir=generated-src --exclude-dir=projects --exclude-dir=gen --exclude-dir=build --exclude-dir=.gradle .)"
NUM_LINES=${#LINES}
if (( $NUM_LINES > 0 )); then
echo "These files seem to be missing a license header:"
echo $LINES
echo $LINES | tr ' ' '\n'
exit 1
fi

0 comments on commit 36242b9

Please sign in to comment.