-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.pre-commit-config.yaml
59 lines (52 loc) · 1.91 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
# pre-commit (https://pre-commit.com/) is a tool that runs source code checks
# such as linting, formatting, and code style.
# CI
# pyosMeta uses pre-commit with the precommit.ci bot to check pull requests.
# Configuration reference doc: https://pre-commit.com/#pre-commit-configyaml---top-level
# Developers
# You may want to install pre-commit to run locally on each minimum_pre_commit_version
# See https://pre-commit.com/#install
# To set up pre-commit hooks: pre-commit install
# To run on all files: pre-commit run --all-files
ci:
# pyosMeta disables autofixing of PRs to simplify new contributor experience and cleaner git history
autofix_prs: false
# Frequency of hook updates
autoupdate_schedule: quarterly
repos:
# Out of the box hooks for pre-commit https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Makes sure files end in a newline and only a newline.
- id: end-of-file-fixer
# Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT.
- id: check-case-conflict
# Remove trailing whitespace on code lines
- id: trailing-whitespace
# Spelling hook
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
exclude_types:
- javascript
- scss
- yaml
additional_dependencies:
- tomli
# Linting and formatting for Python code (see pyproject.toml for config)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.6
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
# Ensure GitHub workflows match the expected schema.
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.30.0
hooks:
- id: check-github-workflows