Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Commit b600fae

Browse files
Add pre-commit support
This change improves code quality and consistency across our project, making it easier for future contributors to understand and maintain our codebase.
1 parent 36ff87a commit b600fae

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-license-identifier: Apache-2.0
2+
##############################################################################
3+
# Copyright (c) 2025
4+
# All rights reserved. This program and the accompanying materials
5+
# are made available under the terms of the Apache License, Version 2.0
6+
# which accompanies this distribution, and is available at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
##############################################################################
9+
default_install_hook_types:
10+
- pre-commit
11+
- prepare-commit-msg
12+
repos:
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v6.0.0
15+
hooks:
16+
- id: trailing-whitespace
17+
- id: check-yaml
18+
- repo: https://github.com/shellcheck-py/shellcheck-py
19+
rev: v0.11.0.1
20+
hooks:
21+
- id: shellcheck
22+
- repo: https://opendev.org/openstack/bashate.git
23+
rev: 2.1.1
24+
hooks:
25+
- id: bashate
26+
# E005 file does not begin with #! or have a .sh prefix
27+
# E006 check for lines longer than 79 columns
28+
# E042 local declaration hides errors
29+
# E043 Arithmetic compound has inconsistent return semantics
30+
args: ["-v", "-iE006", "-iE005,E042,E043"]
31+
files: .*\.sh
32+
exclude: ".tox/.*"
33+
- repo: https://github.com/markdownlint/markdownlint
34+
rev: v0.15.0
35+
hooks:
36+
- id: markdownlint
37+
# MD013: line length
38+
args: ["-r", "~MD013"]
39+
files: \.(md|mdown|markdown)$
40+
- repo: https://github.com/google/yamlfmt
41+
rev: v0.20.0
42+
hooks:
43+
- id: yamlfmt
44+
- repo: https://github.com/electrocucaracha/ai-prepare-commit-msg
45+
rev: cd01dd067c5cfb0fd9fc21a5df1855b18e7bf266
46+
hooks:
47+
- id: ai-prepare-commit
48+
stages:
49+
- prepare-commit-msg

0 commit comments

Comments
 (0)