Skip to content

allow projects to use a custom license header template #36

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

Merged
merged 1 commit into from
Oct 17, 2024
Merged
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
7 changes: 6 additions & 1 deletion .github/workflows/scripts/check-license-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ fatal() { error "$@"; exit 1; }

test -n "${PROJECT_NAME:-}" || fatal "PROJECT_NAME unset"

expected_file_header_template="@@===----------------------------------------------------------------------===@@
if [ -f .license_header_template ]; then
# allow projects to override the license header template
expected_file_header_template=$(cat .license_header_template)
else
expected_file_header_template="@@===----------------------------------------------------------------------===@@
@@
@@ This source file is part of the ${PROJECT_NAME} open source project
@@
Expand All @@ -32,6 +36,7 @@ expected_file_header_template="@@===--------------------------------------------
@@ SPDX-License-Identifier: Apache-2.0
@@
@@===----------------------------------------------------------------------===@@"
fi

paths_with_missing_license=( )

Expand Down