-
Notifications
You must be signed in to change notification settings - Fork 288
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
88 lines (78 loc) · 2.35 KB
/
.pre-commit-config.yaml
File metadata and controls
88 lines (78 loc) · 2.35 KB
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
# .pre-commit-config.yaml
# jcarlin@hmc.edu 25 April 2025
# Pre-commit hook configuration file for riscv-arch-test
# SPDX-License-Identifier: Apache-2.0
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
minimum_pre_commit_version: "4.0.0"
exclude: norm-rules.json
repos:
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
args: ["--assume-in-merge"]
exclude: \.adoc$ # sections titles Level 6 "=======" get flagged otherwise
# - id: check-json # Doesn't support JSON with comments
- id: check-toml
- id: check-yaml
# Ruff Python linter
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.15.9
hooks:
# Run the linter.
- id: ruff-check
args: [--fix]
# Run the formatter.
- id: ruff-format
# Pyright Python type checker
- repo: local
hooks:
- id: pyright
name: pyright
entry: uv run pyright
language: system
types: [python]
# Ensure uv lock file is up to date
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.10.4
hooks:
- id: uv-lock
# Use spaces, not tabs
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.6
hooks:
- id: forbid-tabs
exclude: '.*\.(diff|dump|patch|svg|mk)|Makefile*'
# Prettier for json, yaml, markdown, etc. formatting
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.8.1
hooks:
- id: prettier
# Avoid common misspellings
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
# Check links in markdown files
- repo: https://github.com/tcort/markdown-link-check
rev: v3.14.2
hooks:
- id: markdown-link-check
args: [-q]
# clang-format for assembly files
# - repo: https://github.com/pre-commit/mirrors-clang-format
# rev: "v19.1.7"
# hooks:
# - id: clang-format