Skip to content

Commit

Permalink
ci: Check spelling with codespell
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
spetrosi authored Feb 13, 2025
1 parent 6d215f7 commit cd00e7d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 5 deletions.
Empty file added .codespell_ignores
Empty file.
8 changes: 8 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[codespell]
check-hidden = true
# Note that `-w` doesn't work when ignore-multiline-regex is set
# https://github.com/codespell-project/codespell/issues/3642
ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end
ignore-words = .codespell_ignores
# skip-file is not available https://github.com/codespell-project/codespell/pull/2759
skip = .pandoc_template.html5,.README.html
17 changes: 17 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Codespell configuration is within .codespellrc
---
name: Codespell
on: # yamllint disable-line rule:truthy
- pull_request
permissions:
contents: read
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion .github/workflows/tft_citest_bad.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
RUN_ID=$(gh api "repos/$REPO/actions/workflows/tft.yml/runs?event=issue_comment" \
| jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" ) | .id][0]")
if [ "$RUN_ID" = "null" ]; then
echo "Failed workflow not found, exitting"
echo "Failed workflow not found, exiting"
exit 1
fi
echo "Re-running workflow $RUN_ID"
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ anymore. Match the lower-case strings instead.

### New Features

- adding support fpr Oracle Linux 6,7,8 and 9
- adding support for Oracle Linux 6,7,8 and 9

### Bug Fixes

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# timesync

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

This role installs and configures an NTP and/or PTP implementation to operate
<!--- wokeignore:rule=slave -->
Expand Down Expand Up @@ -105,7 +105,7 @@ timesync_ntp_provider: chrony
# are not covered by the predefined settings provided by this role.
# 'timesync_chrony_custom_settings' allows to define a list of custom settings
# for the chrony.conf file, by providing a list of settings. As an example,
# for debugging, one might need to log mesurements, statistics and tracking.
# for debugging, one might need to log measurements, statistics and tracking.
# This information is usually stored in the /var/log/chrony directory. For
# that, one needs to define two different settings (logdir and log), as
# follows:
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ confidence=
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
Expand Down

0 comments on commit cd00e7d

Please sign in to comment.