-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
91 lines (89 loc) · 3.7 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
85
86
87
88
89
90
91
# SPDX-FileCopyrightText: 2024 grow platform GmbH
#
# SPDX-License-Identifier: MIT
ci:
skip: [madge, check-yaml, biome-check]
default_language_version:
python: python3
repos:
####
## Licenses and copyright
####
- repo: https://github.com/fsfe/reuse-tool
rev: v5.0.2
hooks:
- id: reuse-lint-file
files: '\.(adb|adoc|ads|aes|ahk|ahkl|aidl|applescript|arb|asax|asc|asciidoc|ashx|asm|asmx|aspx|aux|awk|axd|bash|bat|bats|bb|bbappend|bbclass|bib|bzl|c|cabal|cc|cjs|cl|clj|cljc|cljs|cls|cmake|code-workspace|coffee|cpp|cs|csl|cson|css|csproj|csv|cu|cuh|cxx|d|dart|di|doc|docx|dotx|dts|dtsi|el|erl|ex|exs|f|fsproj|f03|f08|f90|f95|fish|fnl|fodp|fods|fodt|for|ftn|fpp|fs|fsx|ftl|gemspec|go|gradle|graphql|graphqls|gqls|groovy|h|ha|hbs|hcl|hh|hjson|hpp|hrl|hs|html|hx|hxsl|ini|ino|ipynb|iuml|j2|java|jinja|jinja2|jl|jpg|jpeg|js|json|json5|jsonc|jsp|jsx|jy|ksh|kt|kts|l|latex|ld|less|license|lisp|lsp|lua|m|m4|man|markdown|md|mjs|mk|ml|mli|nim.cfg|nim|nimble|nimrod|nix|odb|odf|odg|odm|odp|ods|odt|org|otp|ots|ott|pdf|pem|php|php3|php4|php5|pl|plantuml|png|po|pod|pot|ppt|pptx|pri|pro|props|properties|proto|ps1|psm1|pu|puml|pxd|py|pyi|pyw|pyx|qbs|qml|qrc|qss|R|rake|rb|rbw|rbx|rkt|Rmd|rs|rss|rst|s|sass|sbt|sc|scad|scala|scm|scpt|scptd|scss|scsyndef|sh|sld|sln|sls|sml|soy|sps|sql|sty|svg|svelte|swift|t|tcl|tex|textile|tf|tfvars|thy|toc|toml|ts|tsx|ttl|typ|ui|v|vala|vbproj|vhdl|vim|vm|vsh|vtl|vue|webp|xls|xlsx|xml|xq|xql|xqm|xqy|xquery|xsd|xsh|xsl|yaml|yml|zig|zsh)$|Dockerfile|Makefile|CMakeLists\.txt|Gemfile|Jenkinsfile|Rakefile|requirements\.txt'
exclude: 'documentation/under-construction\.jpg|user-documentation/source/resources/features/image-source-information\.md|user-documentation/source/onboarding\.md|user-documentation/source/.*.yaml'
####
## User documentation
####
- repo: local
hooks:
- name: Check filenames in user documentation
language: system
id: file-names-in-user-docs
entry: make -C user-documentation fnlint
pass_filenames: false
files: '^user-documentation/'
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint
args: [--disable=MD013, --disable=MD029, --disable=MD033]
files: '^user-documentation/.*\.md'
####
## Common hooks
####
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=1100']
- id: debug-statements
- id: check-toml
- id: check-yaml
exclude: '^(chart/|.*/testdata/|qg-api-service/(qg-api-service/integration-tests/mocks/[0-9]k\.yaml|localdev/))'
- id: end-of-file-fixer
exclude: '^(.*/testdata)/'
- id: trailing-whitespace
exclude: '^(.*/testdata)/'
# ####
# ## Commit lint
# ####
# - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
# rev: v8.0.0
# hooks:
# - id: commitlint
# stages: [commit-msg]
####
## TS / JS related
####
- repo: https://github.com/biomejs/pre-commit
rev: 'v0.6.0'
hooks:
- id: biome-check
additional_dependencies: ['@biomejs/[email protected]']
exclude: '^(.*/\.vscode/.*|.*/bad_JSON_data\.json|qg-api-service/qg-api-service/oss/.*)$'
- repo: https://github.com/B-S-F/madge-pre-commit
rev: v0.0.3
hooks:
- id: madge
args: [qg-api-service/qg-api-service/src]
####
## Python related
####
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
####
## Go related
####
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-mod-tidy