-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
4 changed files
with
87 additions
and
23 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
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
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,66 @@ | ||
default_language_version: | ||
python: python3 | ||
|
||
repos: | ||
############################################################################# | ||
# Misc | ||
############################################################################# | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-merge-conflict # Searches for merge conflict markers within files. | ||
- id: check-added-large-files # Blocks commits that add large files. Default limit is 500kB. | ||
# Can be configured with args, e.g., '--maxkb=1000' to change the limit. | ||
# exclude: 'your_dir/.*' | ||
# args: ['--maxkb=5000'] | ||
- id: check-case-conflict # Identifies potential case-insensitive file name conflicts. | ||
- id: check-ast # Validates the syntax of Python files. | ||
- id: check-symlinks # Detects broken symlinks. | ||
- id: trailing-whitespace # Removes any trailing whitespace at the end of lines. | ||
- id: end-of-file-fixer # Ensures files end with a single newline or are empty. | ||
|
||
############################################################################# | ||
# JSON, TOML | ||
############################################################################# | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-json # Validates JSON files to ensure they are properly formatted and syntactically correct. | ||
types: [json] | ||
- id: check-toml # Checks TOML files for errors and format issues to ensure valid syntax. | ||
types: [toml] | ||
|
||
############################################################################# | ||
# Shell | ||
############################################################################# | ||
- repo: https://github.com/jumanjihouse/pre-commit-hooks | ||
rev: 3.0.0 | ||
hooks: | ||
- id: shfmt # Formats shell scripts to a standard convention using shfmt. | ||
- id: shellcheck # Lints shell scripts to identify syntax and usage errors, with a specified severity of 'warning'. | ||
args: | ||
- --severity=warning | ||
############################################################################# | ||
# Rust | ||
############################################################################# | ||
- repo: https://github.com/doublify/pre-commit-rust | ||
rev: v1.0 | ||
hooks: | ||
- id: fmt # Formats Rust code using rustfmt | ||
- id: cargo-check # Checks Rust code for compilation errors and warnings | ||
- id: clippy # Lints Rust code with clippy for common mistakes and style issues | ||
############################################################################# | ||
# Markdown, JavaScript, TypeScript, YAML style formatter | ||
############################################################################# | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.3 | ||
hooks: | ||
- id: prettier # An opinionated code formatter supporting multiple languages. | ||
name: prettier | ||
args: [--config, .ci/prettier.json, --write] | ||
types_or: | ||
- javascript | ||
- tsx | ||
- ts | ||
- yaml | ||
- markdown |