-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Enhance the tool with a --init flag to automate setting up the commit-msg hook, including:
- Git Directory Validation – Check if the tool is run inside a valid Git repository.
- Existing Hook Detection – If a commit-msg hook already exists, prompt the user to modify or replace it.
- Automatic Hook Setup – If no existing hook, create one linking to the linter.
- Configurable Options – Allow users to choose custom configurations during setup or by passing
--configflag. - Helpful Messages – Provide clear output on setup success or failure.
More info:
To check linting of the current commit message the commit-msg hook should be modified with the following:
#!/bin/sh
commit_msg_file="$1"
# Run the linter with the commit message file
git-commit-linter lint-file "$commit_msg_file" || exit 1Currently this needs to be modified manually, with this new implementation this configuration will be automated.
Example Command: git-commit-linter --init
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request