mirror of
https://github.com/fzipp/gocyclo.git
synced 2025-02-06 10:23:54 +00:00
Don't skip directories .
and ..
. Fixes #44
This commit is contained in:
parent
b5acf12abc
commit
f9856395da
@ -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
|
||||
|
@ -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(), "_"))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user