Skip to content

Commit

Permalink
Add pre commit action (#53)
Browse files Browse the repository at this point in the history
* Create static_analysis.yml

add github action for pre-commit

* add isort, update black

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml

* Update static_analysis.yml

* Update .pre-commit-config.yaml
  • Loading branch information
CagtayFabry authored Nov 28, 2023
1 parent 14d9cc6 commit 8941ccd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: static analysis
on:
push:
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Lint
uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files --show-diff-on-failure
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
hooks:
- id: black


ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
Expand Down

0 comments on commit 8941ccd

Please # to comment.