Skip to content

Commit

Permalink
Don't skip directories . and ... Fixes #44
Browse files Browse the repository at this point in the history
  • Loading branch information
fzipp committed Apr 6, 2022
1 parent b5acf12 commit f985639
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.1] - 2022-04-06
### Fixed
- Don't skip directories `.` and `..`

## [0.5.0] - 2022-03-22
### Changed
- Ignore `vendor` and `testdata` directories and directories with names
Expand Down
2 changes: 1 addition & 1 deletion analyze.go
Expand Up @@ -59,7 +59,7 @@ var skipDirs = map[string]bool{

func isSkipDir(entry fs.DirEntry) bool {
return entry.IsDir() && (skipDirs[entry.Name()] ||
strings.HasPrefix(entry.Name(), ".") ||
(strings.HasPrefix(entry.Name(), ".") && entry.Name() != "." && entry.Name() != "..") ||
strings.HasPrefix(entry.Name(), "_"))
}

Expand Down

0 comments on commit f985639

Please sign in to comment.