rename filesystem to directory (#1317)

This commit is contained in:
Zachary Rice authored and GitHub committed 2023-12-22 11:08:00 -06:00
1 parent 8de8938ad4
commit 179c607541
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -63,7 +63,7 @@ func runDetect(cmd *cobra.Command, args []string) {
// start the detector scan
if noGit {
paths, err := sources.FilesystemTargets(source, detector.Sema, detector.FollowSymlinks)
paths, err := sources.DirectoryTargets(source, detector.Sema, detector.FollowSymlinks)
if err != nil {
log.Fatal().Err(err)
}
+2 -2
View File
@@ -630,7 +630,7 @@ func TestFromFiles(t *testing.T) {
err = detector.AddGitleaksIgnore(ignorePath)
require.NoError(t, err)
detector.FollowSymlinks = true
paths, err := sources.FilesystemTargets(tt.source, detector.Sema, true)
paths, err := sources.DirectoryTargets(tt.source, detector.Sema, true)
require.NoError(t, err)
findings, err := detector.DetectFiles(paths)
require.NoError(t, err)
@@ -681,7 +681,7 @@ func TestDetectWithSymlinks(t *testing.T) {
cfg, _ := vc.Translate()
detector := NewDetector(cfg)
detector.FollowSymlinks = true
paths, err := sources.FilesystemTargets(tt.source, detector.Sema, true)
paths, err := sources.DirectoryTargets(tt.source, detector.Sema, true)
require.NoError(t, err)
findings, err := detector.DetectFiles(paths)
require.NoError(t, err)
File renamed without changes.
@@ -14,7 +14,7 @@ type ScanTarget struct {
Symlink string
}
func FilesystemTargets(source string, s *semgroup.Group, followSymlinks bool) (<-chan ScanTarget, error) {
func DirectoryTargets(source string, s *semgroup.Group, followSymlinks bool) (<-chan ScanTarget, error) {
paths := make(chan ScanTarget)
s.Go(func() error {
defer close(paths)