mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 12:41:46 +00:00
feat: add default directory skipping for common system and special directories during analysis.
This commit is contained in:
BIN
bin/analyze-go
BIN
bin/analyze-go
Binary file not shown.
@@ -181,6 +181,12 @@ var skipSystemDirs = map[string]bool{
|
||||
".MobileBackups": true, // Time Machine local snapshots
|
||||
}
|
||||
|
||||
var defaultSkipDirs = map[string]bool{
|
||||
"nfs": true, // Network File System
|
||||
"PHD": true, // Parallels Shared Folders / Home Directories
|
||||
"Permissions": true, // Common macOS deny folder
|
||||
}
|
||||
|
||||
var skipExtensions = map[string]bool{
|
||||
".go": true,
|
||||
".js": true,
|
||||
|
||||
@@ -126,6 +126,11 @@ func scanPathConcurrent(root string, filesScanned, dirsScanned, bytesScanned *in
|
||||
}
|
||||
|
||||
if child.IsDir() {
|
||||
// Check if directory should be skipped based on user configuration
|
||||
if defaultSkipDirs[child.Name()] {
|
||||
continue
|
||||
}
|
||||
|
||||
// In root directory, skip system directories completely
|
||||
if isRootDir && skipSystemDirs[child.Name()] {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user