Skip to content

Commit

Permalink
ci: Add pre-commit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Apr 21, 2024
1 parent 88e820e commit ba80772
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
crate
enew
2 changes: 1 addition & 1 deletion .github/workflows/lint-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
uses: nosborn/github-action-markdown-cli@v3.1.0
with:
files: ./website
config_file: ./website/.markdownlintrc
config_file: ./.markdownlintrc
File renamed without changes.
65 changes: 65 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-json
exclude: ^\.vscode/.*$
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
exclude: '\.rtf$'
args: [
--ignore-words=.codespellignore
]
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
args: [
--all,
--,
]
- id: cargo-check
args: [
--locked,
--workspace,
--all-features,
--all-targets,
]
- id: clippy
args: [
--locked,
--workspace,
--all-features,
--all-targets,
--,
-D,
warnings,
]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
alias: markdownlint-app
exclude: '^website/'
- id: markdownlint
alias: markdownlint-website
files: '^website/'
args: ['--config', 'website/.markdownlintrc']

0 comments on commit ba80772

Please sign in to comment.