-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
84 lines (84 loc) · 3.05 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
minimum_pre_commit_version: 2.9.3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-merge-conflict
description: Check for files that contain merge conflict strings.
language_version: python3
- id: mixed-line-ending
description: Replaces or checks mixed line ending.
args: [--fix=lf]
exclude: make.bat
- id: fix-byte-order-marker
description: Removes UTF-8 BOM if present, generally a Windows problem.
language_version: python3
- id: end-of-file-fixer
description: Makes sure files end in a newline and only a newline.
language_version: python3
- id: check-ast
description: Simply check whether files parse as valid python.
language_version: python3
- id: check-yaml
- id: trailing-whitespace
- id: file-contents-sorter
name: File Contents Sorter
description: |
Sort the lines in specified files (defaults to alphabetical).
You must provide list of target files as input in your .pre-commit-config.yaml file.
files: ^(.*requirements.*\.txt|\.brokignore|sitevars.rst)$
- repo: https://github.com/timothycrosley/isort
rev: "5.11.5"
hooks:
- id: isort
description: isort is a Python utility / library to sort imports automatically.
files: ^((noxfile|conf)|docs/_includes/python/.*)\.py$
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
description: Forces best practice formatting of Python code files.
files: ^((noxfile|conf)|docs/_includes/python/.*)\.py$
- repo: https://github.com/myint/rstcheck
rev: 3f92957 # Latest as of 05/17/2020
hooks:
- id: rstcheck
description: Checks syntax of reStructuredText/rst and code blocks nested within it.
args: [--report=warning]
additional_dependencies: [sphinx]
files: ^(index|docs/.*|docs/_includes/.*|README|CONTRIBUTING)\.rst$
exclude: docs/topics/pillar.rst
- repo: https://github.com/asottile/blacken-docs
rev: v1.10.0
hooks:
- id: blacken-docs
description: Run black on python code blocks in documentation files.
files: ^(index|docs/.*|docs/_includes/.*)\.rst$
additional_dependencies: [black==21.8b0]
# - repo: local
# hooks:
# - id: vendir
# name: vale-styles
# description: Pull down vale styles.
# entry: vendir sync
# language: system
# always_run: true
# pass_filenames: false
# - id: vale
# name: vale
# description: Checks style of reStructuredText/rst.
# entry: vale
# language: system
# files: ^(index|docs/.*|docs/_includes/.*|README|CONTRIBUTING)\.rst$
- repo: https://github.com/saltstack/mirrors-nox
rev: v2022.8.7
hooks:
- id: nox
alias: Generate Sphinx docs
description: Generate Sphinx docs, ensure they build
pass_filenames: false
args:
- -e
- 'docs-html(clean=True)'
- --