Should include filename in error displayed if plugin file in baseline not found #718
Closed
1 of 2 tasks
Labels
pending
The issue still needs to be reviewed by one of the maintainers.
I'm submitting a ...
What is the current behavior?
If you run something like
detect-secrets-hook --baseline .secrets.baseline setup.py
andsecrets.baseline
references a custom plugin that doesn't exist, you get aFileNotFoundError
with a long traceback, but unfortunately it doesn't tell you which file is missing.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Note that a
FileNotFoundError
is raised, but it doesn't say which file was not found.A user-friendly error message that tells the user which file was not found. For example, if an invalid plugin is passed in on the command-line:
So a better behavior for this case would be something like this:
But I'd be happy if it still displayed a traceback, but
FileNotFoundError
was raised with the filename that was not found as a parameter.What is the motivation / use case for changing the behavior?
To make debugging easier. I spent a bunch of time yesterday troubleshooting an issue like this and this change would've saved me a lot of time.
Please tell us about your environment:
Other information
The text was updated successfully, but these errors were encountered: