Skip to content

Commit eead881

Browse files
authored
Merge branch 'master' into patch-1
2 parents 25d578c + 906f13f commit eead881

16 files changed

Lines changed: 169 additions & 54 deletions

File tree

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#about-the-dependabotyml-file
2+
version: 2
3+
4+
updates:
5+
# Configure check for outdated GitHub Actions actions in workflows.
6+
# See: https://docs.github.com/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
7+
- package-ecosystem: github-actions
8+
directory: / # Check the repository's workflows under /.github/workflows/
9+
schedule:
10+
interval: daily

.github/workflows/publish_master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Publish master image
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v5
1717
- name: Build
1818
run: |
1919
GITHUB_REPOSITORY_LC=$(echo "${GITHUB_REPOSITORY}" | tr [A-Z] [a-z])

.github/workflows/publish_stable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Publish stable image
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v1
13+
- uses: actions/checkout@v5
1414
- name: Build
1515
run: |
1616
GITHUB_REPOSITORY_LC=$(echo "${GITHUB_REPOSITORY}" | tr [A-Z] [a-z])

.github/workflows/testing.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ jobs:
1919

2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v5
2323

2424
- name: Set up Python
25-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v6
26+
with:
27+
python-version: '3.10'
2628

2729
- name: Install codespell via pip using ${{ matrix.codespell_pip_version }}
28-
run: pip3 --quiet --quiet install ${{ matrix.codespell_pip_version }}
30+
run: pip install ${{ matrix.codespell_pip_version }}
31+
32+
- name: Check codespell
33+
run: codespell --version
2934

3035
- name: Install Bats
3136
run: |
@@ -43,7 +48,7 @@ jobs:
4348
name: Test run action
4449
runs-on: ubuntu-latest
4550
steps:
46-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v5
4752
- uses: ./
4853
with:
4954
path: test/testdata
@@ -53,13 +58,13 @@ jobs:
5358
name: Check for spelling errors
5459
runs-on: ubuntu-latest
5560
steps:
56-
- uses: actions/checkout@v2
61+
- uses: actions/checkout@v5
5762
- uses: ./
5863
with:
5964
check_filenames: true
6065
check_hidden: true
6166
# When using this Action in other repos, the --skip option below can be removed
62-
skip: ./.git,./codespell-problem-matcher/test,./test,./README.md,./.github/workflows/testing.yml
67+
skip: ./.git,./codespell-problem-matcher/test,./test,./README.md,./.github/workflows/testing.yml,./.pre-commit-config.yaml
6368
# Check our README (and this workflow) ignoring the two intentional typos
6469
- uses: ./
6570
with:
@@ -81,9 +86,9 @@ jobs:
8186
include:
8287
- codespell_pip_version: 'git+https://github.com/codespell-project/codespell.git'
8388
steps:
84-
- uses: actions/checkout@v1
89+
- uses: actions/checkout@v5
8590
- name: Set up Python
86-
uses: actions/setup-python@v2
91+
uses: actions/setup-python@v6
8792
- run: pip3 --quiet --quiet install ${{ matrix.codespell_pip_version }}
8893
- run: |
8994
# Simulate the Dockerfile COPY command

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repos:
2+
- repo: https://github.com/codespell-project/codespell
3+
rev: v2.4.1
4+
hooks:
5+
- id: codespell
6+
args: [--ignore-words-list, "abandonned,ackward,bu"]
7+
additional_dependencies:
8+
- tomli

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8-alpine
1+
FROM python:3.13-alpine
22

33
COPY LICENSE \
44
README.md \
@@ -7,7 +7,7 @@ COPY LICENSE \
77
requirements.txt \
88
/code/
99

10-
RUN pip install -r /code/requirements.txt
10+
RUN pip install --no-cache-dir -r /code/requirements.txt
1111

1212
ENTRYPOINT ["/code/entrypoint.sh"]
1313
CMD []

README.md

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Any warnings or errors will be annotated in the Pull Request.
55

66
## Usage
77

8-
```
8+
```yml
99
- uses: actions/checkout@v5
10-
- uses: codespell-project/actions-codespell@master
10+
- uses: codespell-project/actions-codespell@v2
1111
```
1212
1313
### Parameter: check_filenames
@@ -16,8 +16,8 @@ If set, check file names for spelling mistakes as well.
1616
1717
This parameter is optional; by default `codespell` will only check the file contents.
1818

19-
```
20-
uses: codespell-project/actions-codespell@master
19+
```yml
20+
uses: codespell-project/actions-codespell@v2
2121
with:
2222
check_filenames: true
2323
```
@@ -28,8 +28,8 @@ If set, check hidden files (those starting with ".") for spelling mistakes as we
2828

2929
This parameter is optional; by default `codespell` will not check hidden files.
3030

31-
```
32-
uses: codespell-project/actions-codespell@master
31+
```yml
32+
uses: codespell-project/actions-codespell@v2
3333
with:
3434
check_hidden: true
3535
```
@@ -40,8 +40,8 @@ File with lines that should not be checked for spelling mistakes.
4040

4141
This parameter is optional; by default `codespell` will check all lines.
4242

43-
```
44-
uses: codespell-project/actions-codespell@master
43+
```yml
44+
uses: codespell-project/actions-codespell@v2
4545
with:
4646
exclude_file: src/foo
4747
```
@@ -52,8 +52,8 @@ Comma-separated list of files to skip (it accepts globs as well).
5252

5353
This parameter is optional; by default `codespell` won't skip any files.
5454

55-
```
56-
uses: codespell-project/actions-codespell@master
55+
```yml
56+
uses: codespell-project/actions-codespell@v2
5757
with:
5858
skip: foo,bar
5959
```
@@ -62,10 +62,10 @@ with:
6262

6363
Comma-separated list of builtin dictionaries to use.
6464

65-
This parameter is optional; by default `codespell` will use it's default selection of built in dictionaries.
65+
This parameter is optional; by default `codespell` will use its default selection of built in dictionaries.
6666

67-
```
68-
uses: codespell-project/actions-codespell@master
67+
```yml
68+
uses: codespell-project/actions-codespell@v2
6969
with:
7070
builtin: clear,rare
7171
```
@@ -77,8 +77,8 @@ Words are case sensitive based on how they are written in the dictionary file.
7777

7878
This parameter is optional; by default `codespell` will check all words for typos.
7979

80-
```
81-
uses: codespell-project/actions-codespell@master
80+
```yml
81+
uses: codespell-project/actions-codespell@v2
8282
with:
8383
ignore_words_file: .codespellignore
8484
```
@@ -90,21 +90,35 @@ Words are case sensitive based on how they are written in the dictionary file.
9090

9191
This parameter is optional; by default `codespell` will check all words for typos.
9292

93-
```
94-
uses: codespell-project/actions-codespell@master
93+
```yml
94+
uses: codespell-project/actions-codespell@v2
9595
with:
9696
ignore_words_list: abandonned,ackward
9797
```
9898

99+
### Parameter: uri_ignore_words_list
100+
101+
Comma-separated list of words which will be ignored by `codespell` in URIs and emails only.
102+
Words are case sensitive based on how they are written in the dictionary file.
103+
If set to "*", all misspelling in URIs and emails will be ignored.
104+
105+
This parameter is optional; by default `codespell` will check all URIs and emails for typos.
106+
107+
```yml
108+
uses: codespell-project/actions-codespell@v2
109+
with:
110+
uri_ignore_words_list: abandonned
111+
```
112+
99113
### Parameter: path
100114

101115
Indicates the path to run `codespell` in.
102116
This can be useful if your project has code you don't want to spell check for some reason.
103117

104118
This parameter is optional; by default `codespell` will run on your whole repository.
105119

106-
```
107-
uses: codespell-project/actions-codespell@master
120+
```yml
121+
uses: codespell-project/actions-codespell@v2
108122
with:
109123
path: src
110124
```
@@ -117,8 +131,8 @@ All errors and warnings are annotated in Pull Requests, but it will act like eve
117131

118132
This parameter is optional; setting this to any value will enable it.
119133

120-
```
121-
uses: codespell-project/actions-codespell@master
134+
```yml
135+
uses: codespell-project/actions-codespell@v2
122136
with:
123137
only_warn: 1
124138
```

action.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: 'Codespell with annotations'
22
author: 'Peter Newman'
33
description: 'Codespell with annotations for Pull Request'
44
inputs:
5+
builtin:
6+
description: 'Comma-separated list of builtin dictionaries to include'
7+
required: false
8+
default: ''
59
check_filenames:
610
description: 'If set, check file names as well'
711
required: false
@@ -10,16 +14,12 @@ inputs:
1014
description: 'If set, check hidden files (those starting with ".") as well'
1115
required: false
1216
default: ''
13-
exclude_file:
14-
description: 'File with lines that should not be checked for spelling mistakes'
17+
config:
18+
description: 'Path to a codespell config file'
1519
required: false
1620
default: ''
17-
skip:
18-
description: 'Comma-separated list of files to skip (it accepts globs as well)'
19-
required: false
20-
default: './.git'
21-
builtin:
22-
description: 'Comma-separated list of builtin dictionaries to include'
21+
exclude_file:
22+
description: 'File with lines that should not be checked for spelling mistakes'
2323
required: false
2424
default: ''
2525
ignore_words_file:
@@ -30,10 +30,18 @@ inputs:
3030
description: 'Comma-separated list of words to be ignored. Words are case sensitive based on how they are written in the dictionary file'
3131
required: false
3232
default: ''
33+
uri_ignore_words_list:
34+
description: 'comma separated list of words to be ignored in URIs and emails only'
35+
required: false
36+
default: ''
3337
path:
3438
description: 'Path to run codespell in'
3539
required: false
3640
default: ''
41+
skip:
42+
description: 'Comma-separated list of files to skip (it accepts globs as well)'
43+
required: false
44+
default: './.git'
3745
only_warn:
3846
description: 'If set, only warn, never error'
3947
required: false

codespell-problem-matcher/.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@master
28-
- uses: actions/setup-python@v1
28+
- uses: actions/setup-python@v4
29+
with:
30+
python-version:3.x
2931
- run: pip install git+https://github.com/codespell-project/codespell.git
3032
- uses: ./
3133
- name: Check codespell

codespell-problem-matcher/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'codespell problem matcher'
22
author: 'Peter Newman'
33
description: 'Shows codespell errors as annotation (with file and code line) in GitHub Actions'
44
runs:
5-
using: 'node12'
5+
using: 'node20'
66
main: 'index.js'
77
branding:
88
icon: 'search'

0 commit comments

Comments
 (0)