Skip to content

Commit

Permalink
Ignore some files extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
yalosev committed Oct 25, 2023
1 parent ec9992d commit 49e06fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/utils/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ func RecursiveGetExecutablePaths(dir string) ([]string, error) {
return nil
}

// ignore .yaml, .json, .txt, .md files
switch filepath.Ext(f.Name()) {
case ".yaml", ".json", ".md", ".txt":
return nil
}

if !IsFileExecutable(f) {
log.Warnf("File '%s' is skipped: no executable permissions, chmod +x is required to run this hook", path)
return nil
Expand Down

0 comments on commit 49e06fb

Please sign in to comment.