@@ -8,6 +8,25 @@ cd "$REPO_ROOT" || exit 1
8
8
# Define the license header pattern to look for
9
9
LICENSE_PATTERN=" Copyright .* The Hyperlight Authors..*Licensed under the Apache License, Version 2.0"
10
10
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
+
11
30
# Initialize a variable to track missing headers
12
31
MISSING_HEADERS=0
13
32
MISSING_FILES=" "
@@ -30,6 +49,10 @@ done < <(find src -name "*.rs" -type f)
30
49
if [ $MISSING_HEADERS -gt 0 ]; then
31
50
echo " Found $MISSING_HEADERS files with missing or invalid license headers:"
32
51
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."
33
56
exit 1
34
57
else
35
58
echo " All Rust files have the required license header"
0 commit comments