Skip to content

21 add pre commit hooks #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 15, 2025
Merged

21 add pre commit hooks #60

merged 13 commits into from
Apr 15, 2025

Conversation

LevanBokeria
Copy link
Collaborator

@LevanBokeria LevanBokeria commented Apr 14, 2025

Pre-commit CI Configuration

The following CI-related configurations have been added to automate and standardize pre-commit hook updates and fixes:

  • autoupdate_commit_msg: Sets the commit message to "chore: update pre-commit hooks" when pre-commit hooks are auto-updated.
  • autofix_commit_msg: Sets the commit message to "style: pre-commit fixes" when pre-commit automatically applies fixes.

These configurations ensure consistent commit messages for automated updates and fixes.

Pre-commit Hooks Added

The following pre-commit hooks have been configured to ensure code quality and consistency:

  • trailing-whitespace: Removes trailing whitespace from files.
  • end-of-file-fixer: Ensures that files end with a newline.
  • check-yaml: Validates YAML files for syntax errors.
  • check-json: Validates JSON files for syntax errors.
  • check-added-large-files: Checks for large files being added to the repository.
    • Max file size: 500KB
  • check-case-conflict: Detects case conflicts in filenames.
  • check-merge-conflict: Ensures there are no unresolved merge conflict markers in files.
  • check-symlinks: Verifies that all symlinks are valid and not broken.
  • mixed-line-ending: Detects and fixes mixed line endings (CRLF and LF) to avoid cross-platform issues.

These hooks will run automatically before each commit to maintain a clean and consistent codebase.

I've also included CONTRIBUTING.md file that explains how to install and run pre-commit hooks.

@LevanBokeria LevanBokeria self-assigned this Apr 14, 2025
@LevanBokeria LevanBokeria linked an issue Apr 14, 2025 that may be closed by this pull request
6 tasks
@LevanBokeria LevanBokeria marked this pull request as ready for review April 14, 2025 16:29
@LevanBokeria LevanBokeria requested a review from MaxBalmus April 14, 2025 16:29
@LevanBokeria LevanBokeria merged commit c555f5d into dev Apr 15, 2025
2 checks passed
@LevanBokeria LevanBokeria deleted the 21-add-pre-commit-hooks branch April 15, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pre-commit hooks
2 participants