From 3419d99edf272a595404fb037f42dd4fcd85ea03 Mon Sep 17 00:00:00 2001 From: Dennis Hendriks Date: Mon, 19 Apr 2021 15:13:59 +0200 Subject: [PATCH] #64 Allow just last year in license headers. - Adapted Checkstyle check. - Adapted generic check script. - Updated one CIF test model that was missing a license header. --- .../tests/pprint_elim_cdef/import_sym_warn.cif | 13 +++++++++++++ misc/license-header/license-header-check.bash | 2 +- .../org.eclipse.escet.configuration/checkstyle.xml | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/cif/org.eclipse.escet.cif.tests/tests/pprint_elim_cdef/import_sym_warn.cif b/cif/org.eclipse.escet.cif.tests/tests/pprint_elim_cdef/import_sym_warn.cif index e411c329e..fbc82ad3a 100644 --- a/cif/org.eclipse.escet.cif.tests/tests/pprint_elim_cdef/import_sym_warn.cif +++ b/cif/org.eclipse.escet.cif.tests/tests/pprint_elim_cdef/import_sym_warn.cif @@ -1 +1,14 @@ +////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available +// under the terms of the MIT License which is available at +// https://opensource.org/licenses/MIT +// +// SPDX-License-Identifier: MIT +////////////////////////////////////////////////////////////////////////////// + import "enums1.cif"; diff --git a/misc/license-header/license-header-check.bash b/misc/license-header/license-header-check.bash index 01c3ed780..5178a1067 100755 --- a/misc/license-header/license-header-check.bash +++ b/misc/license-header/license-header-check.bash @@ -203,7 +203,7 @@ POST_EXCLUDE_PATTERN="$POST_EXCLUDE_PATTERN|^./.Xauthority-.*:0$" # Get license header count per file, using copyright statement from license header. # Exclude ones with exactly one match, as that is the expected/desired situation. -grep -r -c $EXCLUDE_ARGS "Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation" . | \ +grep -r -c $EXCLUDE_ARGS -E "Copyright \(c\) ([0-9]{4}, )?2021 Contributors to the Eclipse Foundation" . | \ grep -v "^.*:1$" | grep -v -E $POST_EXCLUDE_PATTERN > misc/license-header/license-header-list.txt # Print/check results. diff --git a/releng/org.eclipse.escet.configuration/checkstyle.xml b/releng/org.eclipse.escet.configuration/checkstyle.xml index fcd1858e4..f230e503b 100644 --- a/releng/org.eclipse.escet.configuration/checkstyle.xml +++ b/releng/org.eclipse.escet.configuration/checkstyle.xml @@ -275,7 +275,7 @@ SPDX-License-Identifier: MIT - + -- GitLab