WSL/SLF GitLab Repository

.pre-commit-config.yaml 1.48 KB
Newer Older
Sam's avatar
Sam committed
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
repos:
  # Autoupdate: Python code
  - repo: https://github.com/asottile/pyupgrade
    rev: v2.29.1
    hooks:
      - id: pyupgrade
        args: [--py39-plus]

  # Autoformat: Python code
  - repo: https://github.com/psf/black
    rev: 21.11b1
    hooks:
      - id: black
        args: [--target-version=py39]

  # Autoformat: YAML, JSON, Markdown, etc.
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v2.5.0
    hooks:
      - id: prettier

  # Lint: Dockerfile
  - repo: https://github.com/hadolint/hadolint.git
    rev: v2.8.0
    hooks:
      - id: hadolint-docker
        entry: hadolint/hadolint:v2.8.0 hadolint
28
        args: ["--ignore=DL3008", "--ignore=DL3013"]
Sam's avatar
Sam committed
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

  # Lint: YAML
  - repo: https://github.com/adrienverge/yamllint.git
    rev: v1.26.3
    hooks:
      - id: yamllint
        args: ["-d {extends: relaxed, rules: {line-length: disable}}", "-s"]
        files: \.(yaml|yml)$

  # Lint: Bash scripts
  - repo: https://github.com/openstack-dev/bashate.git
    rev: 2.1.0
    hooks:
      - id: bashate
        args: ["--ignore=E006"]

  # Lint: Shell scripts
  - repo: https://github.com/shellcheck-py/shellcheck-py
    rev: v0.8.0.1
    hooks:
      - id: shellcheck
        args: ["-x", "--exclude=SC1091"]

  # Lint: Python
  - repo: https://github.com/PyCQA/flake8
    rev: 4.0.1
    hooks:
      - id: flake8

  # Lint: Markdown
  - repo: https://github.com/igorshubovych/markdownlint-cli
    rev: v0.30.0
    hooks:
      - id: markdownlint
        args: ["--fix"]