Skip to content

Commit e92d55e

Browse files
committed
Added a pre-commit config file.
1 parent e854abf commit e92d55e

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# repos:
2+
# - repo: https://github.com/pre-commit/mirrors-clang-format
3+
# rev: v19.1.1
4+
# hooks:
5+
# - id: clang-format
6+
# args: [-style=file]
7+
# # You can fine-tune the file types here. Example:
8+
# files: \.(c|cpp|cc|cxx|h|hpp|hxx)$
9+
# exclude: ^third_party/
10+
11+
# See https://pre-commit.com for more information
12+
# See https://pre-commit.com/hooks.html for more hooks
13+
repos:
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v5.0.0
16+
hooks:
17+
- id: trailing-whitespace
18+
- id: end-of-file-fixer
19+
- id: check-yaml
20+
- id: check-added-large-files
21+
22+
# Clang-format for C++
23+
# This brings in a portable version of clang-format.
24+
# See also: https://github.com/ssciwr/clang-format-wheel
25+
- repo: https://github.com/pre-commit/mirrors-clang-format
26+
rev: v19.1.4
27+
hooks:
28+
- id: clang-format
29+
types_or: [c++, c]
30+
31+
# CMake linting and formatting
32+
- repo: https://github.com/BlankSpruce/gersemi
33+
rev: 0.17.1
34+
hooks:
35+
- id: gersemi
36+
name: CMake linting
37+
38+
# Markdown linting
39+
# Config file: .markdownlint.yaml
40+
- repo: https://github.com/igorshubovych/markdownlint-cli
41+
rev: v0.43.0
42+
hooks:
43+
- id: markdownlint
44+
language: system
45+
46+
- repo: https://github.com/codespell-project/codespell
47+
rev: v2.3.0
48+
hooks:
49+
- id: codespell
50+
files: ^.*\.(cmake|cpp|hpp|txt|md|json|in|yaml|yml)$
51+
args: ["--ignore-words", ".codespellignore" ]

0 commit comments

Comments
 (0)