-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: introduce pre-commit integration (#604)
* ci: introduce pre-commit integration Follow-up-of: #442 * fix trailing whitespace * add shellcheck, codespell * fix spelling
- Loading branch information
Thiago Perrotta
authored
Nov 16, 2023
1 parent
1108ab2
commit 0f93124
Showing
4 changed files
with
59 additions
and
5 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,18 @@ | ||
# https://github.com/pre-commit/action | ||
|
||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: 'main' | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- uses: pre-commit/[email protected] |
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,36 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
# | ||
# Install pre-commit itself: | ||
# $ pip install pre-commit | ||
# OR | ||
# $ brew install pre-commit | ||
# | ||
# Update all pre-commit hooks to latest version: | ||
# $ pre-commit autoupdate | ||
# | ||
# Install all pre-commit hooks locally: | ||
# $ pre-commit install | ||
# | ||
# Apply a given pre-commit hook to all files: | ||
# $ pre-commit run --all-files <id> | ||
# | ||
# Apply all pre-commit hooks to all files: | ||
# $ pre-commit run --all-files | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.9.0.6 | ||
hooks: | ||
- id: shellcheck | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell |
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