Skip to content

Commit

Permalink
chore: add precommit to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sphamba committed Nov 27, 2024
1 parent 3f51372 commit 2e0051b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: stylua
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: stylua-github --all-files

- name: codespell
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: codespell --all-files
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ repos:
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v2.0.1
hooks:
- id: stylua-github
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.6.0
hooks:
Expand Down

0 comments on commit 2e0051b

Please sign in to comment.