Skip to content

Commit 0e84c10

Browse files
committed
Date update
Adding a condition to check the validity of the starting date
1 parent 3aa3bd9 commit 0e84c10

31 files changed

+97
-78
lines changed

check_license/check_headers.sh

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
2-
# Copyright (C) 2016-2024 Intel Corporation
3-
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
4-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2+
# Copyright (C) 2016-2024 Intel Corporation
3+
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
4+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
# check-headers.sh - check copyright and license in source files
77

@@ -142,29 +142,48 @@ s/.*Copyright (C) \([0-9]\+\).*/\1/' "$src_path")
142142
COMMIT_FIRST=`echo $FIRST | cut -d"-" -f1`
143143
COMMIT_LAST=` echo $LAST | cut -d"-" -f1`
144144

145-
if [ "$COMMIT_FIRST" != "" -a "$COMMIT_LAST" != "" ]; then
146-
if [[ -n "$COMMIT_FIRST" && -n "$COMMIT_LAST" ]]; then
147-
if [[ $COMMIT_FIRST -eq $COMMIT_LAST ]]; then
148-
NEW=$COMMIT_LAST
149-
else
150-
NEW=$COMMIT_FIRST-$COMMIT_LAST
151-
fi
152-
153-
if [[ "$YEARS" == "$NEW" ]]; then
154-
continue
155-
else
156-
if [[ ${UPDATE_DATES} -eq 1 ]]; then
157-
sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}"
158-
else
159-
echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $NEW)" >&2
160-
RV=1
161-
fi
162-
fi
163-
fi
164-
else
165-
echo "error: unknown commit dates in file: $file" >&2
166-
RV=1
167-
fi
145+
# echo "HEADER_FIRST:$HEADER_FIRST, HEADER_LAST:$HEADER_LAST, COMMIT_FIRST:$COMMIT_FIRST, COMMIT_LAST:$COMMIT_LAST"
146+
if [ "$COMMIT_FIRST" != "" -a "$COMMIT_LAST" != "" ]; then
147+
if [[ -n "$COMMIT_FIRST" && -n "$COMMIT_LAST" ]]; then
148+
if [[ $HEADER_FIRST -le $COMMIT_FIRST ]]; then
149+
# HEADER_FIRST is valid, only validate HEADER_LAST
150+
if [[ $HEADER_LAST -eq $COMMIT_LAST ]]; then
151+
continue
152+
else
153+
if [[ ${UPDATE_DATES} -eq 1 ]]; then
154+
NEW="$HEADER_FIRST-$COMMIT_LAST"
155+
sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}"
156+
else
157+
echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $HEADER_FIRST-$COMMIT_LAST)" >&2
158+
echo "HEADER_FIRST:$HEADER_FIRST, HEADER_LAST:$HEADER_LAST, COMMIT_FIRST:$COMMIT_FIRST, COMMIT_LAST:$COMMIT_LAST"
159+
RV=1
160+
fi
161+
fi
162+
else
163+
# HEADER_FIRST is invalid, require full date correction
164+
if [[ $COMMIT_FIRST -eq $COMMIT_LAST ]]; then
165+
NEW=$COMMIT_LAST
166+
else
167+
NEW=$COMMIT_FIRST-$COMMIT_LAST
168+
fi
169+
170+
if [[ "$YEARS" == "$NEW" ]]; then
171+
continue
172+
else
173+
if [[ ${UPDATE_DATES} -eq 1 ]]; then
174+
sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}"
175+
else
176+
echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $NEW)" >&2
177+
echo "HEADER_FIRST:$HEADER_FIRST, HEADER_LAST:$HEADER_LAST, COMMIT_FIRST:$COMMIT_FIRST, COMMIT_LAST:$COMMIT_LAST"
178+
RV=1
179+
fi
180+
fi
181+
fi
182+
fi
183+
else
184+
echo "error: unknown commit dates in file: $file" >&2
185+
RV=1
186+
fi
168187
done
169188
rm -f $TMP $TMP2 $TEMPFILE
170189

check_license/file-exceptions.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
#!/bin/sh -e
2-
# Copyright (C) 2024 Intel Corporation
2+
# Copyright (C) 2025 Intel Corporation
33
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
44
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
# You can add an exception file
77
# list for license and copyright check
8-
grep -v -E -e 'src/uthash/.*' \
9-
-e 'benchmark/ubench.h' \
10-
-e 'include/umf/proxy_lib_new_delete.h' \
11-
-e 'docs/config/conf.py' \
12-
-e 'src/uthash/utlist.h' \
13-
-e 'src/uthash/uthash.h' \
14-
-e '\.yml$'\
15-
-e '\.clang-format$' \
16-
-e '\.md$' \
17-
-e '\.cmake-format$' \
8+
grep -v -E -e 'benchmark/ubench.h' \
9+
-e 'ChangeLog' \
1810
-e 'CODEOWNERS$' \
19-
-e 'scripts/assets/images/.*' \
2011
-e 'docs/assets/.*' \
12+
-e 'docs/config/conf.py' \
2113
-e 'docs/config/Doxyfile' \
22-
-e '\.rst$' \
23-
-e '\.xml$' \
24-
-e '\.txt$' \
25-
-e 'test/supp/.*' \
26-
-e '\.json$' \
14+
-e 'include/umf/proxy_lib_new_delete.h' \
2715
-e 'LICENSE.TXT' \
28-
-e '.github/workflows/.spellcheck-conf.toml' \
16+
-e 'scripts/assets/images/.*' \
17+
-e 'src/uthash/.*' \
18+
-e 'src/uthash/utlist.h' \
19+
-e 'src/uthash/uthash.h' \
20+
-e 'test/supp/.*' \
21+
-e '.clang-format$' \
22+
-e '.cmake-format$' \
23+
-e '.cmake.in$' \
2924
-e '.gitignore' \
25+
-e '.json$' \
3026
-e '.mailmap' \
27+
-e '.md$' \
28+
-e '.patch$' \
29+
-e '.rst$' \
30+
-e '.spellcheck-conf.toml' \
3131
-e '.trivyignore' \
32-
-e 'ChangeLog' \
33-
-e '\.cmake.in$' \
34-
-e '\.patch$'
32+
-e '.txt$' \
33+
-e '.xml$' \
34+
-e '.yml$'

cmake/helpers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2022-2024 Intel Corporation
1+
# Copyright (C) 2022-2025 Intel Corporation
22
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

include/umf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

include/umf/memory_pool_ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

include/umf/memtarget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

include/umf/pools/pool_jemalloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

include/umf/pools/pool_scalable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/ctl/ctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2016-2024 Intel Corporation
3+
* Copyright (C) 2016-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/libumf.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
;;;; Begin Copyright Notice
2-
; Copyright (C) 2024 Intel Corporation
2+
; Copyright (C) 2023-2025 Intel Corporation
33
; Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
44
; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55
;;;; End Copyright Notice

src/libumf.map

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2023-2025 Intel Corporation
22
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

src/libumf.rc.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2024 Intel Corporation
1+
// Copyright (C) 2024-2025 Intel Corporation
22
//
33
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -51,7 +51,7 @@ BEGIN
5151
VALUE "CompanyName", "Intel Corporation\0"
5252
VALUE "FileDescription", "Unified Memory Framework (UMF) library\0"
5353
VALUE "FileVersion", _UMF_VERSION "\0"
54-
VALUE "LegalCopyright", "Copyright 2024, Intel Corporation. All rights reserved.\0"
54+
VALUE "LegalCopyright", "Copyright 2024-2025, Intel Corporation. All rights reserved.\0"
5555
VALUE "LegalTrademarks", "\0"
5656
VALUE "OriginalFilename", "umf.dll\0"
5757
VALUE "ProductName", "Unified Memory Framework (UMF)\0"

src/memory_pool_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/memory_provider_get_last_failed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/memory_provider_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/memspaces/memspace_numa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/memtargets/memtarget_numa.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/pool/pool_disjoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

src/proxy_lib/proxy_lib.rc.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2024 Intel Corporation
1+
// Copyright (C) 2024-2025 Intel Corporation
22
//
33
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -51,7 +51,7 @@ BEGIN
5151
VALUE "CompanyName", "Intel Corporation\0"
5252
VALUE "FileDescription", "Unified Memory Framework (UMF) proxy library\0"
5353
VALUE "FileVersion", _UMF_VERSION "\0"
54-
VALUE "LegalCopyright", "Copyright 2024, Intel Corporation. All rights reserved.\0"
54+
VALUE "LegalCopyright", "Copyright 2024-2025, Intel Corporation. All rights reserved.\0"
5555
VALUE "LegalTrademarks", "\0"
5656
VALUE "OriginalFilename", "umf_proxy.dll\0"
5757
VALUE "ProductName", "Unified Memory Framework (UMF)\0"

src/utils/utils_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/utils/utils_posix_concurrency.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/utils/utils_windows_concurrency.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

src/utils/utils_windows_math.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

test/common/pool_trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

test/common/test_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
// This file contains tests for UMF pool API

test/malloc_compliance_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

test/poolFixtures.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

test/pools/jemalloc_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

test/pools/pool_base_alloc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

test/pools/scalable_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

test/provider_os_memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

0 commit comments

Comments
 (0)