Skip to content

Commit 57f0d3f

Browse files
committed
misc: Add support for command line spellchequing with typo
1 parent 1c37d58 commit 57f0d3f

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ jobs:
4444
run: |
4545
ruff check --preview --output-format github
4646
47+
spellcheck:
48+
name: "Spellcheck everything"
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout Actions Repository
52+
uses: actions/checkout@v4
53+
- name: Spell Check Repo
54+
uses: crate-ci/typos@v1.38.1
55+
4756
actionlint:
4857
name: "Lint Github actions YAML files"
4958
# There's a way to add error formatting so GH actions adds messages to code,

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,24 @@ known_first_party = ["devito", "examples"]
8484
multi_line_output = "VERTICAL_GRID_GROUPED"
8585
force_alphabetical_sort_within_sections = true
8686

87+
[tool.typos]
88+
# For identifiers (variables, functions, classes and the like):
89+
# Ignore words 2 characters or fewer followed by zero or more digits
90+
# Also ignore collections of 20 or more "word character"s
91+
default.extend-ignore-identifiers-re = ["\\b[[:alpha:]]{1,2}\\d*\\b", "\\b\\w{20,}\\b"]
92+
# For words:
93+
# Ignore words 2 characters or fewer followed by one or more digits
94+
# Also ignore collections of 20 or more "word character"s
95+
default.extend-ignore-words-re = ["\\b[[:alpha:]]{1,2}\\d?\\b", "\\b\\w{20,}\\b"]
96+
97+
# Only for known words common abbreviations
98+
# IMPORTANT: Add a comment with the meaning!
99+
[tool.typos.default.extend-identifiers]
100+
# arange - numpy.arange
101+
arange = "arange"
102+
# dorder - derivative order
103+
dorder = "dorder"
104+
87105
[tool.flake8]
88106
max-line-length = 90
89107
ignore = [

0 commit comments

Comments
 (0)