Skip to content

Commit

Permalink
layout
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 20, 2024
1 parent d3b16e0 commit a9c608f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions steps/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,13 @@ bibcop tex/report.bib
find "${LOCAL}" -name '*.sh' -type f -print0 | xargs -0 -n1 shellcheck --shell=bash --severity=style

header="Copyright (c) 2021-$(date +%Y) Yegor Bugayenko"

copyright_check="false"

# Iterate over each file in the directory recursively
while IFS= read -r file; do
# Search for the pattern in the file
if ! grep -q "$header" "$file"; then
copyright_check="true"
echo "⚠️ Copyright not found in file: $file"
fi
# avoid test-zone and unparseable folders
done < <(find "$LOCAL" \( -path "$LOCAL/fixtures/filters/unparseable" -prune \) -o \( -path "$LOCAL/test-zone" -prune \) -o -type f \( -name "*.sh" -o -name "*.py" -o -name "*.rb" -o -name "*.java" -o -name "*.xml" \) -print)

if [[ "${copyright_check}" = "true" ]]; then
exit 1
fi

0 comments on commit a9c608f

Please sign in to comment.