-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f12e1d
commit c1ae1b8
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
default_stages: [pre-commit] | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
# Attempts to load all json files to verify syntax. | ||
- id: check-json | ||
|
||
# Prettify JSON files | ||
- id: pretty-format-json | ||
args: [--autofix, --indent=4, --no-sort-keys] | ||
|
||
# Check for files that contain merge conflict strings. | ||
- id: check-merge-conflict | ||
|
||
# Attempts to load all TOML files to verify syntax. | ||
- id: check-toml | ||
|
||
# Makes sure files end in a newline and only a newline. | ||
- id: end-of-file-fixer | ||
stages: [pre-commit, manual] | ||
|
||
# Replaces or checks mixed line ending. | ||
- id: mixed-line-ending | ||
args: [--fix=no] | ||
|
||
# Trims trailing whitespace. | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
stages: [pre-commit, manual] | ||
|
||
# Sorts entries in requirements.txt | ||
- id: requirements-txt-fixer | ||
|
||
# Sort imports | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: [--profile=black] | ||
|
||
# Fix common misspellings in source code | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
entry: codespell --write-changes | ||
|
||
# Fast Python linter | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.1.6 | ||
hooks: | ||
- id: ruff | ||
args: [--target-version, "py312"] | ||
|
||
# Shell script linter | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.9.0.6 | ||
hooks: | ||
- id: shellcheck | ||
|
||
# YAML linter | ||
- repo: https://github.com/adrienverge/yamllint | ||
rev: v1.33.0 | ||
hooks: | ||
- id: yamllint | ||
args: [--config-data, "{extends: relaxed, rules: {line-length: {max: 100}}}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[tool.black] | ||
line-length = 99 |