mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Feat/ignore finding (#938)
This commit is contained in:
1 parent
e890a8e809
commit
3bace4c735
11 files changed
+713
-8
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user