`.secretsignore` without `[secrets]` isn’t used
Closed this issue · 0 comments
adamchainz commented
Say my .secretsignore
should ignore everything:
$ cat .secretsignore
*
It doesn't unfortunately work:
$ pre-commit run ripsecrets --all-files --verbose
Found existing alias for "pre-commit run". You should use: "prcr"
ripsecrets...............................................................Failed
- hook id: ripsecrets
- duration: 0.01s
- exit code: 1
credentials.toml:3:password = 'uJSU7Kxquv5FXDRLF7SCBaksmo9o2Zp8'
Adding an empty [secrets]
section makes it work though:
$ echo "[secrets]" >> .secretsignore
$ pre-commit run ripsecrets --all-files --verbose
Found existing alias for "pre-commit run". You should use: "prcr"
ripsecrets...............................................................Passed
- hook id: ripsecrets
- duration: 0.01s
This seems to be due to missed creation of the Gitignore
object in one branch in https://github.com/sirwart/ripsecrets/blob/main/src/ignore_info.rs