forked from mkdocs-publisher/mkdocs-publisher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
120 lines (112 loc) · 3.35 KB
/
.pre-commit-config.yaml
File metadata and controls
120 lines (112 loc) · 3.35 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: insert-license
name: insert project license into Python files
files: ^(mkdocs_publisher|tests)/
types: [file, text, python]
args:
- --license-filepath
- LICENSE
- --use-current-year
- --allow-past-years
- id: insert-license
name: insert project license into HTML files
files: ^mkdocs_publisher/
types: [file, text, html]
args:
- --license-filepath
- LICENSE
- --comment-style
- <!--| ~| -->
- --use-current-year
- --allow-past-years
- id: insert-license
name: insert project license into CSS files
files: ^mkdocs_publisher/
exclude: \.min.css$
types: [file, text, css]
args:
- --license-filepath
- LICENSE
- --comment-style
- /*| *| */
- --use-current-year
- --allow-past-years
- id: insert-license
name: insert project license into JS files
files: ^mkdocs_publisher/
exclude: \.min.js$
types: [file, text, javascript]
args:
- --license-filepath
- LICENSE
- --comment-style
- //
- --use-current-year
- --allow-past-years
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
exclude: ^(docs|mkdocs_publisher_docs/.obsidian)/
- id: trailing-whitespace
exclude: ^(docs|mkdocs_publisher_docs/.obsidian)/
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-json
- id: check-toml
- id: detect-private-key
- id: no-commit-to-branch
- id: name-tests-test
files: ^tests/
exclude: \.md$
- repo: local
hooks:
- id: check-readme-md
name: check if README.md is updated
description: Copy README.md file from documentation
entry: bash -c "cmp --silent mkdocs_publisher_docs/README.md README.md || cp mkdocs_publisher_docs/README.md README.md"
language: system
pass_filenames: false
- id: lint-yaml
name: lint YAML files
description: Format and check YAML files.
entry: poetry run yamllint
language: system
files: \.(yml|yaml)$
- id: format
name: format Python code
description: Pre-format python code.
entry: poetry run black --quiet
language: system
types:
- python
- id: sort-imports
name: sort Python imports
description: Sort python imports.
entry: poetry run isort --quiet
language: system
types:
- python
- id: lint-python
name: lint Python
description: Lint python code.
entry: poetry run ruff check
language: system
types:
- python
- id: type-check
name: type check Python annotations
description: Pyright type annotation checking.
entry: poetry run pyright
language: system
types:
- python
- id: pytest-check
name: run unittests
entry: poetry run pytest
language: system
pass_filenames: false
always_run: true