diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-06 15:46:14 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-06 15:46:14 +0700 |
| commit | 7ba3a36f94b5dd274ecc932895a05072e6e0080c (patch) | |
| tree | 0cc0e158853540b3b193c7842ee3301b2cd25500 /scm.go | |
| parent | 2cda75bc9385da199b4db5f6cc2692bfd694fcf1 (diff) | |
| download | spdxconv-7ba3a36f94b5dd274ecc932895a05072e6e0080c.tar.xz | |
all: refactoring loadConfig and scanForSCM
Previously, given the following command,
$ spdxconv $path
the loadConfig load the configuration from the path directory.
This changes it to load the configuration from the current working
directory where the tools run, not from $path directory.
While for scanForSCM, previously its detect SCM from $path up to "/", now
its scan from $path to current working directory only.
While at it, we rename the dummySCM type to noSCM.
Diffstat (limited to 'scm.go')
| -rw-r--r-- | scm.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -8,9 +8,10 @@ type sourceCodeManagement interface { IsIgnored(path string) bool } -// dummySCM is a no scm. It always return false on IsIgnored. -type dummySCM struct{} +// noSCM is a type to indicate working directory without SCM. +// It always return false on IsIgnored. +type noSCM struct{} -func (scm *dummySCM) IsIgnored(path string) bool { +func (scm *noSCM) IsIgnored(path string) bool { return false } |
