@@ -8,6 +8,25 @@ cd "$REPO_ROOT" || exit 1
88# Define the license header pattern to look for
99LICENSE_PATTERN=" Copyright .* The Hyperlight Authors..*Licensed under the Apache License, Version 2.0"
1010
11+ # Define the full license header for files that need it
12+ LICENSE_HEADER=' /*
13+ Copyright 2024 The Hyperlight Authors.
14+
15+ Licensed under the Apache License, Version 2.0 (the "License");
16+ you may not use this file except in compliance with the License.
17+ You may obtain a copy of the License at
18+
19+ http://www.apache.org/licenses/LICENSE-2.0
20+
21+ Unless required by applicable law or agreed to in writing, software
22+ distributed under the License is distributed on an "AS IS" BASIS,
23+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24+ See the License for the specific language governing permissions and
25+ limitations under the License.
26+ */
27+
28+ '
29+
1130# Initialize a variable to track missing headers
1231MISSING_HEADERS=0
1332MISSING_FILES=" "
@@ -30,6 +49,10 @@ done < <(find src -name "*.rs" -type f)
3049if [ $MISSING_HEADERS -gt 0 ]; then
3150 echo " Found $MISSING_HEADERS files with missing or invalid license headers:"
3251 echo -e " $MISSING_FILES "
52+ echo " "
53+ echo " Please add the following license header to these files:"
54+ echo " $LICENSE_HEADER "
55+ echo " You can also run: just check-license-headers to verify your changes."
3356 exit 1
3457else
3558 echo " All Rust files have the required license header"
0 commit comments