diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-14 20:44:06 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-14 20:44:06 +0700 |
| commit | 8da1336917c763da16bc6466928c796f269548e8 (patch) | |
| tree | 49b45259bcfc63dd18d2236906a69acad8e37b1b /file.go | |
| parent | e5a023cc2aa1aec320574abd92eb9ea24846e0b5 (diff) | |
| download | spdxconv-8da1336917c763da16bc6466928c796f269548e8.tar.xz | |
all: handle binary file in post-scan
File that match with match-file-pattern but without prefix and suffix
will be marked as binary.
Diffstat (limited to 'file.go')
| -rw-r--r-- | file.go | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -120,7 +120,16 @@ func (f *file) initLines(content []byte, maxLine int) (err error) { func (f *file) scan(conv *SPDXConv) { f.detectComment(&conv.cfg) - if f.isBinary || f.isUnknown { + if f.isBinary { + f.licenseID = valDefault + f.copyrightText = valDefault + f.getYearFromSCM(conv) + if f.copyrightYear == `` { + f.copyrightYear = conv.cfg.CopyrightYear + } + return + } + if f.isUnknown { return } f.scanLicenseID(conv) |
