Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ func (f *FileWalker) walkDirectoryRecursive(iteration int,
// 2. one or more match
// for #1 this means we should include the file
// for #2 this means the last one wins since it should be the most correct
if ignore.MatchIsDir(joined, false) != nil {
shouldIgnore = ignore.Ignore(joined)
if m := ignore.MatchIsDir(joined, false); m != nil {
shouldIgnore = m.Ignore()
if shouldIgnore {
skipReason = SkipReasonGitignore
} else {
Expand All @@ -476,8 +476,8 @@ func (f *FileWalker) walkDirectoryRecursive(iteration int,

for _, ignore := range ignores {
// same rules as above
if ignore.MatchIsDir(joined, false) != nil {
shouldIgnore = ignore.Ignore(joined)
if m := ignore.MatchIsDir(joined, false); m != nil {
shouldIgnore = m.Ignore()
if shouldIgnore {
skipReason = SkipReasonIgnoreFile
} else {
Expand All @@ -488,8 +488,8 @@ func (f *FileWalker) walkDirectoryRecursive(iteration int,

for _, ignore := range customIgnores {
// same rules as above
if ignore.MatchIsDir(joined, false) != nil {
shouldIgnore = ignore.Ignore(joined)
if m := ignore.MatchIsDir(joined, false); m != nil {
shouldIgnore = m.Ignore()
if shouldIgnore {
skipReason = SkipReasonCustomIgnore
} else {
Expand Down Expand Up @@ -646,8 +646,8 @@ func (f *FileWalker) walkDirectoryRecursive(iteration int,
// 2. one or more match
// for #1 this means we should include the file
// for #2 this means the last one wins since it should be the most correct
if ignore.MatchIsDir(joined, true) != nil {
shouldIgnore = ignore.Ignore(joined)
if m := ignore.MatchIsDir(joined, true); m != nil {
shouldIgnore = m.Ignore()
if shouldIgnore {
skipReason = SkipReasonGitignore
} else {
Expand All @@ -657,8 +657,8 @@ func (f *FileWalker) walkDirectoryRecursive(iteration int,
}
for _, ignore := range ignores {
// same rules as above
if ignore.MatchIsDir(joined, true) != nil {
shouldIgnore = ignore.Ignore(joined)
if m := ignore.MatchIsDir(joined, true); m != nil {
shouldIgnore = m.Ignore()
if shouldIgnore {
skipReason = SkipReasonIgnoreFile
} else {
Expand All @@ -668,8 +668,8 @@ func (f *FileWalker) walkDirectoryRecursive(iteration int,
}
for _, ignore := range customIgnores {
// same rules as above
if ignore.MatchIsDir(joined, true) != nil {
shouldIgnore = ignore.Ignore(joined)
if m := ignore.MatchIsDir(joined, true); m != nil {
shouldIgnore = m.Ignore()
if shouldIgnore {
skipReason = SkipReasonCustomIgnore
} else {
Expand All @@ -679,8 +679,8 @@ func (f *FileWalker) walkDirectoryRecursive(iteration int,
}
for _, ignore := range moduleIgnores {
// same rules as above
if ignore.MatchIsDir(joined, true) != nil {
shouldIgnore = ignore.Ignore(joined)
if m := ignore.MatchIsDir(joined, true); m != nil {
shouldIgnore = m.Ignore()
if shouldIgnore {
skipReason = SkipReasonModuleIgnore
} else {
Expand Down