Skip to content

Commit

Permalink
rename filesystem to directory (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
zricethezav committed Dec 22, 2023
1 parent 8de8938 commit 179c607
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions detect/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion sources/filesystem.go → sources/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 179c607

Please sign in to comment.