Skip to content

Commit

Permalink
Merge pull request #85 from Yelp/better-error-messages
Browse files Browse the repository at this point in the history
better error messages for pre-commit hook
  • Loading branch information
domanchi authored Oct 22, 2018
2 parents 42a81ac + d216018 commit bce3bff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions detect_secrets/pre_commit_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ def get_baseline(baseline_filename):
'The supplied baseline may be incompatible with the current\n'
'version of detect-secrets. Please recreate your baseline to\n'
'avoid potential mis-configurations.\n\n'
'$ detect-secrets scan --update %s\n\n'
'Current Version: %s\n'
'Baseline Version: %s',
baseline_filename,
VERSION,
baseline_version if baseline_version else '0.0.0',
)
Expand Down
2 changes: 2 additions & 0 deletions tests/pre_commit_hook_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def test_fails_if_baseline_version_is_outdated(
'version of detect-secrets. Please recreate your baseline to\n'
'avoid potential mis-configurations.\n'
'\n'
'$ detect-secrets scan --update will_be_mocked\n'
'\n'
'Current Version: {}\n'
'Baseline Version: {}\n'
).format(
Expand Down

0 comments on commit bce3bff

Please sign in to comment.