diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-12 20:50:38 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-12 21:23:12 +0700 |
| commit | 9817757f8dca159aa261315a91fceff1d9a13566 (patch) | |
| tree | dd9ce0b3913e187b447c55518a01387fc059009d /file.go | |
| parent | bf35b0b8ab23f07c491e1c6b97c90b772942b7b7 (diff) | |
| download | spdxconv-9817757f8dca159aa261315a91fceff1d9a13566.tar.xz | |
all: add configuration for setting default copyright year
The `copyright_year` set the default year to be used in
`SPDX-FileCopyrightText`.
The year can be a single year (for example "2026"), range of year (for
example, "2000-2026"), or list of year with comma separated (for example,
"2000,2001,2026"); as long as there is no space in between.
Diffstat (limited to 'file.go')
| -rw-r--r-- | file.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -240,8 +240,9 @@ func (f *file) apply(conv *SPDXConv) (err error) { f.topLines = slices.Insert(f.topLines, f.idxLicenseID, rawline) if f.copyrightYear == valUnknown { - f.copyrightYear = `` - } else { + f.copyrightYear = conv.cfg.CopyrightYear + } + if f.copyrightYear != `` { f.copyrightYear += ` ` } // REUSE-IgnoreStart |
