-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
69 lines (61 loc) · 1.93 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
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
# formatting
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-toml
- id: check-json
# versionning issues
- id: check-merge-conflict
- id: no-commit-to-branch
args: [--branch, main]
# structure
- id: check-symlinks
- id: destroyed-symlinks
# Security
- id: detect-private-key
- repo: https://github.com/pylint-dev/pylint
rev: v3.0.3
hooks:
# linting
- id: pylint
additional_dependencies:
- .
name: pylint
entry: pylint
language: python
types: [python]
args: [-rn, --exit-zero, '--fail-on=F,E']
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3.11
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.27.1 # or higher tag
hooks:
- id: yamllint
args: [--format, parsable, --strict]
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.2 # or other specific tag
hooks:
- id: yamlfmt
#
# 1- Create an access token with api scope.
# 2- Set access token value in an environment variable named GITLAB_TOKEN or
# GITLABCI_LINT_TOKEN.
# 3- Add the projectId for your gitlab project as a command line argument, or
# set it in the config file.
# 4- Ensure the virtualenv Python version is 3.8 or later.
# - repo: https://github.com/bjd2385/pre-commit-gitlabci-lint
# rev: v1.3.0
# hooks:
# - id: gitlabci-lint
# args: [-b, 'https://custom.gitlab.host.com', '-p', '12345678']