lirantal / detect-secrets

A developer-friendly secrets detection tool for CI and pre-commit hooks based on Yelp's detect-secrets
Apache License 2.0
49 stars 4 forks source link

Enhancement: Support for enabling debug logs via flags #1

Open lirantal opened 5 years ago

lirantal commented 5 years ago

Is your feature request related to a problem? Please describe. If I'm trying to debug how detect-secrets work then I need to run it with DEBUG=detect-secrets which lint-staged isn't friendly with. Instead, I'd want to pass it some flags like --debug in order to enable debugging.

Describe the solution you'd like

  1. Add a --debug flag to enable debugging
  2. This should enable debug dynamically via debug.enable('detect-secrets')
  3. Discard the flag from process.argv so it doesn't get passed to the actual detect-secrets-hook tool

Describe alternatives you've considered Open to other ideas