Implemented a pre-commit hook to promote naming consistency across YAML #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Implemented a git pre-commit hook that enforces a naming convention for YAML files and directories. The hook ensures that any committed YAML files or directories with underscores in their names are automatically renamed to use dashes. This change also includes BATS tests to validate the functionality of the hook.
Related Issue(s)
N/A
Testing
Created a BATS test suite that verifies:
Manual testing by staging files and directories with underscores and observing the changes post-hook execution.
Documentation
The script itself has inline comments detailing its purpose and functionality. No additional external documentation has been provided.
Screenshots/GIFs (optional)
N/A
Checklist
mage runprecommit
locally and fixed any issues that arose.