Skip to content

chore: add pre-commit hooks - #50

Merged
michalmaj merged 1 commit into
mainfrom
chore/add-pre-commit
Sep 26, 2026
Merged

michalmaj merged 1 commit into
mainfrom
chore/add-pre-commit

Conversation

@michalmaj

Copy link
Copy Markdown
Owner

Summary

Add fast pre-commit hooks after the guide's foundational commands are already established.

Why

Hooks provide quick feedback before a commit without hiding or replacing the complete local checks and required CI workflow.

Changes

  • add pre-commit and configure file hygiene plus Ruff hooks
  • add a focused chapter covering installation, manual runs, automatic fixes, and the relationship with CI
  • align the learning path, checklist, roadmap, troubleshooting, cheatsheet, and configuration examples
  • accept the small end-of-file and trailing-whitespace fixes found by the first full hook run

Type of change

Select the most relevant option.

  • Documentation
  • Project configuration
  • New feature
  • Tests
  • CI/CD
  • Refactoring
  • Bug fix

Checklist

  • The change is small and focused
  • The pull request title is clear
  • I updated documentation if needed
  • I added or updated tests if needed
  • I ran local checks if applicable

Verification

  • uv run pre-commit validate-config
  • uv run pre-commit run --all-files
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run pytest --cov=text_toolkit --cov-report=term-missing
  • uv run mypy
  • uv build --no-sources
  • git diff --check

Notes

The hooks intentionally exclude pytest, coverage, mypy, and distribution builds so commits stay fast. The existing Quality checks job remains the required shared verification.

@michalmaj
michalmaj merged commit b331b29 into main Sep 26, 2026
1 check passed
@michalmaj
michalmaj deleted the chore/add-pre-commit branch September 26, 2026 14:51
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.

1 participant