Feat/ignore finding (#938)

This commit is contained in:
Zachary Rice authored and GitHub committed 2022-08-07 12:53:58 -05:00
1 parent e890a8e809
commit 3bace4c735
11 files changed
+713 -8

No files matched your search

+5
View File
@@ -71,6 +71,11 @@ func runDetect(cmd *cobra.Command, args []string) {
log.Fatal().Err(err)
}
// check for a .gitleaksignore file
if info, err := os.Stat(filepath.Join(source, ".gitleaksignore")); !os.IsNotExist(err) && !info.IsDir() {
detector.AddGitleaksIgnore(filepath.Join(source, ".gitleaksignore"))
}
// set exit code
exitCode, err := cmd.Flags().GetInt("exit-code")
if err != nil {