Skip to content

Commit

Permalink
SUKU pre-commit workflow added with basic configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
SukuWc committed Dec 28, 2023
1 parent 45a3052 commit 503290d
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to 'ignore-words.txt' (one word per line).
# Or copy & paste the whole problematic line to 'exclude-file.txt'
ignore-words = tools/codespell/ignore-words.txt
exclude-file = tools/codespell/exclude-file.txt
check-filenames =
check-hidden =
count =
skip = .git,./lib
25 changes: 25 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: pre-commit

on:
workflow_dispatch:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Checkout code
uses: actions/checkout@v3

- name: Run pre-commit
uses: pre-commit/[email protected]
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
#
# SPDX-License-Identifier: Unlicense

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: trailing-whitespace
exclude: |
(?x)^(
grid_common/lua-5.4.3/|
grid_make/thirdparty/
)
- id: end-of-file-fixer
exclude: |
(?x)^(
grid_common/lua-5.4.3/|
grid_make/thirdparty/
)
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args: [-w]
exclude: |
(?x)^(
grid_common/lua-5.4.3/|
grid_make/thirdparty/
)

0 comments on commit 503290d

Please sign in to comment.