aboutsummaryrefslogtreecommitdiff
path: root/scm.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-06 15:46:14 +0700
committerShulhan <ms@kilabit.info>2026-01-06 15:46:14 +0700
commit7ba3a36f94b5dd274ecc932895a05072e6e0080c (patch)
tree0cc0e158853540b3b193c7842ee3301b2cd25500 /scm.go
parent2cda75bc9385da199b4db5f6cc2692bfd694fcf1 (diff)
downloadspdxconv-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.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/scm.go b/scm.go
index d94ee18..1353625 100644
--- a/scm.go
+++ b/scm.go
@@ -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
}