| Crates.io | word_warden |
| lib.rs | word_warden |
| version | 0.1.5 |
| created_at | 2025-02-18 16:46:59.604693+00 |
| updated_at | 2025-04-25 13:18:23.700401+00 |
| description | A command line tool that finds undesired strings in files. It's intended use is as a pre-commit hook to prevent the user from committing or pushing if certain words are found in the changed files such as debug statements or FIXME notices. |
| homepage | |
| repository | https://github.com/tmillenaar/wordwarden |
| max_upload_size | |
| id | 1560150 |
| size | 12,825 |
A command-line tool that finds undesired strings in files. It is intended to be used as a pre-commit hook to prevent committing or pushing if certain words are found in the changed files, such as debug statements or FIXME notices.
target/debug/word_warden <file1> <file2> 'word1' 'word2' 'word3']
Use --casecheck and --no-casecheck to determine whether the check should be case-sensitive. The default is to not be case sensitive.
Use '--escape=skip-this-line' to ignore occurances of words found on a line with the specified escape string. The default escape string is 'wordwarden:skip-line'
Word Warden can be used as a pre-commit hook. To use it, add wordwarden to your .pre-commit-config.yaml. It would look something like:
repos:
- repo: https://github.com/tmillenaar/wordwarden
rev: v0.1.2
hooks:
- id: wordwarden
name: Word Warden - Debug Statements
entry: word_warden
args: ["breakpoint()", ".set_trace()"]
stages: [pre-commit, pre-push]
- repo: https://github.com/tmillenaar/wordwarden
rev: v0.1.2
hooks:
- id: wordwarden
name: Word Warden - WIP comments
entry: word_warden
args: ["WIP", "FIXME", "nocheckin"]
stages: [pre-push]
In this example every commit is checked on breakpoints and every push is checked on comments related to work-in-progress.
Customize these words for your usecase. To make use of the pre-push, make sure to install that hook: pre-commit install --hook-type pre-commit --hook-type pre-push.
Repository: tmillenaar/wordwarden