Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve pre-commit framework docs #58

Merged
merged 1 commit into from Feb 1, 2023

Conversation

adamchainz
Copy link
Contributor

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.

Comment on lines -101 to +91
- repo: https://github.com/sirwart/ripsecrets.git
# Set your version, be sure to use the latest and update regularly or use 'main'
rev: v0.1.5
- repo: https://github.com/sirwart/ripsecrets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI the .git is not needed on the end for cloning repos, as explained by pre-commit creator Anthony in this video - removing it to match the pre-commit style

@sirwart sirwart merged commit c78e9b1 into sirwart:main Feb 1, 2023
@adamchainz adamchainz deleted the pre_commit_docs branch February 2, 2023 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants