Skip to content

Commit 21d9921

Browse files
authored
ci: Check spelling with codespell (#115)
* ci: Check spelling with codespell * You can ignore words inline by adding a comment like `# codespell:ignore word`. * You can ignore words by adding them to the `.codespell_ignores` file. * You can ignore files and directories by adding them with `skip = ` to the `.codespellrc` file. Signed-off-by: Sergei Petrosian <[email protected]>
1 parent e0ab907 commit 21d9921

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

.codespell_ignores

Whitespace-only changes.

.codespellrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[codespell]
2+
check-hidden = true
3+
# Note that `-w` doesn't work when ignore-multiline-regex is set
4+
# https://github.com/codespell-project/codespell/issues/3642
5+
ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end
6+
ignore-words = .codespell_ignores
7+
# skip-file is not available https://github.com/codespell-project/codespell/pull/2759
8+
skip = .pandoc_template.html5,.README.html

.github/workflows/codespell.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Codespell configuration is within .codespellrc
2+
---
3+
name: Codespell
4+
on: # yamllint disable-line rule:truthy
5+
- pull_request
6+
permissions:
7+
contents: read
8+
jobs:
9+
codespell:
10+
name: Check for spelling errors
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Codespell
17+
uses: codespell-project/actions-codespell@v2

.github/workflows/tft_citest_bad.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
RUN_ID=$(gh api "repos/$REPO/actions/workflows/tft.yml/runs?event=issue_comment" \
3737
| jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" ) | .id][0]")
3838
if [ "$RUN_ID" = "null" ]; then
39-
echo "Failed workflow not found, exitting"
39+
echo "Failed workflow not found, exiting"
4040
exit 1
4141
fi
4242
echo "Re-running workflow $RUN_ID"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PostgreSQL system role
22

3-
[![ansible-lint.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/ansible-test.yml) [![markdownlint.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/markdownlint.yml) [![tft.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/woke.yml)
3+
[![ansible-lint.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/ansible-test.yml) [![codespell.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/markdownlint.yml) [![tft.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/postgresql/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/postgresql/actions/workflows/woke.yml)
44

55
The PostgreSQL system role installs, configures, and starts the PostgreSQL
66
server.
@@ -132,7 +132,7 @@ postgresql_input_file: "/tmp/mypath/file.sql"
132132
### postgresql_server_tuning
133133

134134
By default, the PostgreSQL system role enables server settings optimization
135-
based on system resources. To disabe the tuning, set the
135+
based on system resources. To disable the tuning, set the
136136
`postgresql_server_tuning` variable to `false`.
137137

138138
```yaml
@@ -149,7 +149,7 @@ This section should cover role behavior for repeated runs.
149149

150150
Once you set the password by using the `postgresql_password` variable, it is
151151
impossible to change the password by setting another value. You must use the
152-
`postgresql_password` variable for every database acces under the superuser,
152+
`postgresql_password` variable for every database access under the superuser,
153153
including running an SQL script (the functionality of the
154154
`postgresql_input_file` variable).
155155

@@ -165,7 +165,7 @@ Once the PostgreSQL server is installed, it is impossible to upgrade or
165165
downgrade the server by increasing or decreasing the version number in the
166166
`postgresql_version` variable.
167167

168-
### Server tunning
168+
### Server tuning
169169

170170
This option reflects the setup of the latest run of the role.
171171

tests/tests_input_file.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
register: result
2525
changed_when: false
2626

27-
- name: Check content of databse
27+
- name: Check content of database
2828
assert:
2929
that: >
3030
"1 row" in result.stdout

0 commit comments

Comments
 (0)