Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for missing license headers #2378

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ jobs:
with:
python-version: '3.x'
- run: git fetch --prune --unshallow --tags
- run: make check_license_headers
- run: make check

5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ check_license_headers:
@echo "Files missing license headers:\n"
@find . -type f \( -path './scripts/*' -o -path './schemas/*' \) \
\( -name '*.py' -o -name '*.yml' \) \
-print0 | xargs -0 -n1 grep -L "Licensed to Elasticsearch B.V." \
|| exit 0
-print0 | xargs -0 -n1 grep -L "Licensed to Elasticsearch B.V."

# Clean deletes all temporary and generated content.
.PHONY: clean
Expand Down Expand Up @@ -86,7 +85,7 @@ misspell:
fi
./build/misspell/bin/misspell -error README.md CONTRIBUTING.md schemas/* docs/* experimental/schemas/*

# Warn re misspell removal
# Warn re misspell removal
.PHONY: misspell_warn
misspell_warn:
@echo "Warning: due to lack of cross-platform support, misspell is no longer included in this task and may be deprecated in future\n"
Expand Down