thoughtworks / talisman

Using a pre-commit hook, Talisman validates the outgoing changeset for things that look suspicious — such as tokens, passwords, and private keys.
https://thoughtworks.github.io/talisman/
MIT License
1.9k stars 243 forks source link

#454 Fix - Malformed talismanrc should not be ignored and raise error #458

Closed deepthirera closed 2 months ago

deepthirera commented 3 months ago

This pull request introduces a fix for issue #454. Now, encountering an invalid .talismanrc file will trigger an error message. This enhancement is particularly beneficial when using custom patterns through the custom_patterns option.

Previously, an invalid .talismanrc file might be silently ignored, especially if it contained extraneous lines or tabs. This could lead to undetected issues with any custom patterns defined within the file. By implementing error handling, we ensure that invalid configurations are caught promptly, preventing potential problems.