Add or update the license header

Proprietary

Starts each Java source file with the given header, such as a copyright or license notice, unless it already starts with it, comparing lines as SonarQube does. The file's first comment, or first run of // lines, is replaced when it mentions a copyright, a license or an SPDX identifier, and is otherwise kept below the header, as is the Javadoc of the first type or of a package in package-info.java.

io.moderne.staticanalysis.AddOrUpdateLicenseHeader
mod run . --recipe=io.moderne.staticanalysis.AddOrUpdateLicenseHeader

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.