# 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 🛠️
1. Install the pre-commit package if you haven't already:
pip install pre-commit-keyword-checker
2. Add the following content to your project's `.pre-commit-config.yaml` file, replacing `yourusername` with your GitHub username:
```yaml
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.
1. 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/AliYmn/pre-commit-keyword-checker",
"name": "pre-commit-keyword-checker",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Ali Yaman",
"author_email": "aliymn.db@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/dc/08/d754387594248a7e0a4a8f7b8b73b6672f2dd94ea5c7250bab4b9134eca9/pre-commit-keyword-checker-1.5.0.tar.gz",
"platform": null,
"description": "# Pre-commit Keyword Checker \ud83d\udcdd\u2705\n\nWelcome 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!\n\n## Installation \ud83d\udee0\ufe0f\n\n1. Install the pre-commit package if you haven't already:\n \n pip install pre-commit-keyword-checker\n\n2. Add the following content to your project's `.pre-commit-config.yaml` file, replacing `yourusername` with your GitHub username:\n\n```yaml\nrepos:\n - repo: https://github.com/AliYmn/pre-commit-keyword-checker\n rev: master\n hooks:\n - id: check-keywords\n args: [\"--keywords\", \"KEYWORD1\", \"KEYWORD2\", \"--exclude-files\", \"file2.txt\"]\n````\n\nReplace KEYWORD1, KEYWORD and file1.txt with your desired keywords and excluded files.\n\n\n1. Install the pre-commit hook to your project:\n\n pre-commit install\n\nAnd you're all set! \ud83c\udf89\n\n# Usage\nOnce 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.\n\nYou can also run the pre-commit hook manually:\n\n pre-commit run check-keywords\n\nAnd you're good to go! \ud83d\ude80\n# Configuration\n\n --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.\n\n --exclude-files: A list of files to exclude from the keyword check.\n\n\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A pre-commit hook for checking specified keywords in the files being committed.",
"version": "1.5.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5fffae1ebb3565588e53ce5868778ee2374c0a1cc8c65276da53127b4cdf2b67",
"md5": "dfa0fbab8cebb839d82eb84c2e7a72ea",
"sha256": "9f1ec6bbc982ee31344ed18da1a92a51744e555fbee09e62cec776ee5bc55f36"
},
"downloads": -1,
"filename": "pre_commit_keyword_checker-1.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dfa0fbab8cebb839d82eb84c2e7a72ea",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4212,
"upload_time": "2023-03-22T09:41:26",
"upload_time_iso_8601": "2023-03-22T09:41:26.595619Z",
"url": "https://files.pythonhosted.org/packages/5f/ff/ae1ebb3565588e53ce5868778ee2374c0a1cc8c65276da53127b4cdf2b67/pre_commit_keyword_checker-1.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dc08d754387594248a7e0a4a8f7b8b73b6672f2dd94ea5c7250bab4b9134eca9",
"md5": "6eb834ea1e8b632ba53a340eae8c0f3a",
"sha256": "e936f1704b70e8540256bc322e57166b6e48f42fc21931eed1c581507adfdea4"
},
"downloads": -1,
"filename": "pre-commit-keyword-checker-1.5.0.tar.gz",
"has_sig": false,
"md5_digest": "6eb834ea1e8b632ba53a340eae8c0f3a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3439,
"upload_time": "2023-03-22T09:41:32",
"upload_time_iso_8601": "2023-03-22T09:41:32.971039Z",
"url": "https://files.pythonhosted.org/packages/dc/08/d754387594248a7e0a4a8f7b8b73b6672f2dd94ea5c7250bab4b9134eca9/pre-commit-keyword-checker-1.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-22 09:41:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "AliYmn",
"github_project": "pre-commit-keyword-checker",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pre-commit-keyword-checker"
}