diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..f6c166e --- /dev/null +++ b/.github/workflows/lint.yaml @@ -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/action@v3.0.1 + with: + extra_args: stylua-github --all-files + + - name: codespell + if: success() || failure() + uses: pre-commit/action@v3.0.1 + with: + extra_args: codespell --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b2606eb..cfde5c3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,7 @@ repos: hooks: - id: trailing-whitespace - id: end-of-file-fixer + - id: check-yaml - repo: https://github.com/JohnnyMorganz/StyLua rev: v2.0.1 hooks: @@ -13,9 +14,9 @@ repos: - 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: