Skip to content

Commit

Permalink
ci: Add workflow for running codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
candleindark committed Nov 11, 2024
1 parent 659071e commit dd966d9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Codespell configuration is within pyproject.toml
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ exclude_lines = [
"if TYPE_CHECKING:",
]

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*'
check-hidden = true
# ignore-regex = ''
# ignore-words-list = ''

[tool.ruff]
line-length = 88
indent-width = 4
Expand All @@ -103,7 +110,6 @@ ignore = [
"PLR6301",
"S",
"TID252",

# Allow access to protected members in tests
"SLF001",
]
]

0 comments on commit dd966d9

Please sign in to comment.