Commit Graph

4 Commits

Author SHA1 Message Date
Sam Brannen 41f35ef6b3 Update configuration for copyright headers to use "<year>-present" pattern
Historically, we have used `<introduction year>-<modification year>` as
the pattern for copyright headers.

For example: `Copyright 2002-2025 the original author or authors.`

However, we have been encouraged to use `present` as the modification
year.

In light of that, this commit updates the following to enforce the new
pattern.

- The patterns in our SpringHeaderCheck Checkstyle rules
- The `Copyright 2002-${year}` template in org.eclipse.jdt.ui.prefs
- The update_copyright_headers.sh script

See gh-35070
2025-06-17 16:20:46 +02:00
Sam Brannen bb6150e44e Use correct Kotlin file extension in update_copyright_headers.sh 2023-02-19 13:41:36 +01:00
Sam Brannen 52e967a525 Apply update_copyright_headers.sh to staged files as well 2022-11-30 15:18:11 +01:00
Sam Brannen c49b0825f9 Introduce update_copyright_headers.sh shell script
In order to automate maintenance of copyright headers in our source
code (especially when merging PRs from external contributors), this
commit introduces an update_copyright_headers.sh script (tested on
mac OS) that will update the copyright headers of all Java, Kotlin,
and Groovy source files that have been added or modified this year
(or at least as far back as the git log history supports it).

For example, running this script currently outputs the following.

Updating copyright headers in Java, Kotlin, and Groovy source code for year 2022
warning: log for 'main' only goes back to Tue, 16 Aug 2022 16:24:55 +0200
2022-11-29 19:34:11 +01:00