Skip to content
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

chore: add git hooks #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-vcs-permalinks
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
- id: check-added-large-files
- id: check-toml
- repo: https://github.com/grantjenks/blue
rev: v0.9.1
hooks:
- id: blue
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.275
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.0
hooks:
- id: mypy
args:
[--show-error-codes]
- repo: https://github.com/python-poetry/poetry
rev: "1.5.0"
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: ["-f", "requirements.txt", "-o", "requirements.txt"]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.3.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,17 @@ npm run compile-sass
```

Caso queira editar as bordas e cores da mensagem, veja a documentação das variáveis usadas no SCSS [desse projeto aqui](https://nigelotoole.github.io/pixel-borders/) e mude o que quiser no `@include` feito na classe `.message`.

## Instalar git hooks para desenvolvimento

```shell
poetry shell
poetry install
pre-commit install
pre-commit install --hook-type commit-msg
```

Para atualizar os hooks com base na ultima tag do repo:
```shell
pre-commit autoupdate
```
Loading