Skip to content

Commit

Permalink
Added precommit config
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
  • Loading branch information
delihus committed Oct 24, 2023
1 parent 7bbbf4f commit ac0baa2
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: name-tests-test
files: ^.*\/test\/.*$
args: [--pytest-test-first]

- repo: https://github.com/codespell-project/codespell
rev: v1.16.0
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell *
language: python
types: [text]

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.1
hooks:
- id: yamlfmt
files: ^.github|./\.yaml

- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: ["--line-length=99"]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ["--ignore=E501,W503"] # ignore too long line and line break before binary operator,
# black checks it

# Docs - RestructuredText hooks
- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
hooks:
- id: doc8
args: ['--max-line-length=100', '--ignore=D001']
exclude: ^.*\/CHANGELOG\.rst/.*$
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format

0 comments on commit ac0baa2

Please sign in to comment.