sirwart / ripsecrets

A command-line tool to prevent committing secret keys into your source code
MIT License
800 stars 24 forks source link

Improve pre-commit framework docs #58

Closed adamchainz closed 1 year ago

adamchainz commented 1 year ago

Hi @sirwart , thanks for the great tool. I'm just writing up a book section on how to set up ripsecrets, via pre-commit, and I thought I'd try improve the instructions in the repo whilst I'm at it.

I made these improvements:

  1. Improve some terminology - pre-commit uses "hooks" not "plugins"
  2. Remove advice about updating regularly - I think this applies to all pre-commit users, who should be aware of the pre-commit autoupdate command, or use pre-commit.ci that runs this for you.
  3. Show the sample config first, then explain the options.
  4. Edit to recommend the ripsecrets hook, because since version 2.21.0, pre-commit can bootstrap Rust if it is unavailable (pre-commit PR, open docs improvement PR). This should make the ripsecrets hook preferable to ripsecrets-system.