Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Add codespell workflow #215

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .codespell/.codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,node_modules,yarn.lock,Cargo.lock
count =
quiet-level = 3
ignore-words = ./.codespell/wordlist.txt
1 change: 1 addition & 0 deletions .codespell/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
codespell==2.2.5
1 change: 1 addition & 0 deletions .codespell/wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
crate
30 changes: 30 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# A Github action that using codespell to check spell.
# .codespell/.codespellrc is a config file.
# .codespell/wordlist.txt is a list of words that will ignore word checks.
# More details please check the following link:
# https://github.com/codespell-project/codespell

name: Codespell

on: pull_request

jobs:
codespell:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-

- name: Install prerequisites
run: sudo pip install -r ./.codespell/requirements.txt

- name: Spell check
run: codespell --config=./.codespell/.codespellrc
4 changes: 2 additions & 2 deletions internal/etl/process/subscribers.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (s *subscribers) Publish(e core.Event) error {
}
}

// NOTE - Consider introducing a fail safe timeout to ensure that freezing on clogged chanel buffers is recognized
// NOTE - Consider introducing a fail safe timeout to ensure that freezing on clogged channel buffers is recognized
for _, channel := range s.subs {
channel <- e
}
Expand All @@ -36,7 +36,7 @@ func (s *subscribers) Publish(e core.Event) error {
}

func (s *subscribers) PublishBatch(dataSlice []core.Event) error {
// NOTE - Consider introducing a fail safe timeout to ensure that freezing on clogged chanel buffers is recognized
// NOTE - Consider introducing a fail safe timeout to ensure that freezing on clogged channel buffers is recognized
for _, data := range dataSlice {
// NOTE - Does it make sense to fail loudly here?

Expand Down