Open dizzersee opened 4 years ago
I agree that git-secrets should exit with a non-zero exit code in the case of encountering an error in a pattern.
Also, --add should attempt to validate the pattern, although invalid patterns could still be added via git config
or directly editing the config file.
If an invalid regex pattern is added to config, e.g. "(" not escaped, git-secrets exits with exit code 0. Because the regex is invalid, it does not scan anything. This is not good for integrating it into a CI/CD-pipeline. As there is an error, shouldn't git-secrets exit with another exit code?