Pre-commit Keyword Checker 📝✅
Welcome to the Pre-commit Keyword Checker! This handy pre-commit hook checks for specified keywords in the files being committed. It offers file exclusion options and customizable keyword lists to make sure your commits stay keyword-free!
Installation 🛠️
-
Install the pre-commit package if you haven't already:
pip install pre-commit-keyword-checker -
Add the following content to your project's
.pre-commit-config.yamlfile, replacingyourusernamewith your GitHub username:
repos:
- repo: https://github.com/AliYmn/pre-commit-keyword-checker
rev: master
hooks:
- id: check-keywords
args: ["--keywords", "KEYWORD1", "KEYWORD2", "--exclude-files", "file2.txt"]
Replace KEYWORD1, KEYWORD and file1.txt with your desired keywords and excluded files.
-
Install the pre-commit hook to your project:
pre-commit install
And you're all set! 🎉
Usage
Once installed, the keyword-checking pre-commit hook will be run whenever you commit changes in your project. If any of the specified keywords are found in the files being committed (excluding the specified files), the commit will be blocked, and the script will display a list of keyword errors.
You can also run the pre-commit hook manually:
pre-commit run check-keywords
And you're good to go! 🚀
Configuration
--keywords: A list of keywords to search for in the files being committed. If this argument is not provided or left empty, the script will exit without checking the files.
--exclude-files: A list of files to exclude from the keyword check.
Metadata
Release files for pre-commit-keyword-checker 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pre-commit-keyword-checker-1.5.0.tar.gz | 3.4 kB | Without provenance | Details for pre-commit-keyword-checker-1.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pre_commit_keyword_checker-1.5.0-py3-none-any.whl | Python 3 | none | any | Details for pre_commit_keyword_checker-1.5.0-py3-none-any.whl |
Total release size: 7.7 kB
Release files / pre-commit-keyword-checker-1.5.0.tar.gz
| Download URL | pre-commit-keyword-checker-1.5.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e936f1704b70e8540256bc322e57166b6e48f42fc21931eed1c581507adfdea4
|
|
BLAKE2b-256 checksum How to use checksums |
dc08d754387594248a7e0a4a8f7b8b73b6672f2dd94ea5c7250bab4b9134eca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.13
|
Release files / pre_commit_keyword_checker-1.5.0-py3-none-any.whl
| Download URL | pre_commit_keyword_checker-1.5.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f1ec6bbc982ee31344ed18da1a92a51744e555fbee09e62cec776ee5bc55f36
|
|
BLAKE2b-256 checksum How to use checksums |
5fffae1ebb3565588e53ce5868778ee2374c0a1cc8c65276da53127b4cdf2b67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.13
|
Security for pre-commit-keyword-checker 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.