Skip to content

Commit

Permalink
Ignore some files extensions (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
yalosev authored Oct 25, 2023
1 parent ec9992d commit dc4f77b
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 dc4f77b

Please sign in to comment.