The project main language is English.
Run the following command to install the pre-commit hook:
- install prek
prek run # command to run pre-commit hook manually
prek install # install pre-commit hook to run automatically before each commitThis will ensure that your code adheres to the project's coding standards before each commit.
Commit messages should follow the conventional commit specification.
The allowed structural elements are:
featfor new features.fixfor bug fixes.chorefor changes to the build process or auxiliary tools and libraries such as documentation generation.refactorfor code changes that neither fix a bug nor add a feature.docsfor any documentation/README changes.
Commit messages should be structured in a way that can be read as if they were completing the sentence "If applied, this commit will...". For example:
feat: add new authentication method to API
Reads as "If applied, this commit will add new authentication method to API".
Branch names should follow the pattern ^(feat|fix|chore|refactor|docs)\/[a-z0-9]+(-[a-z0-9]+)*$. This means that branch names should:
- Start with the same structural elements as commit messages.
- Be descriptive and contain only lowercase letters and numbers.
- Use hyphens to separate words.
For example:
feat/add-user-authenticationfix/issue-with-database-connectionchore/update-dependenciesrefactor/improve-code-structuredocs/update-contributing-guidelines
To verify that your branch name adheres to these guidelines, you can use the following command:
git rev-parse --abbrev-ref HEAD | grep -Eq '^(feat|fix|chore|refactor|docs)\/[a-z0-9]+(-[a-z0-9]+)*$' && echo "Branch name is compliant" || echo "Invalid branch name"