diff --git a/.codespell/.codespellrc b/.codespell/.codespellrc new file mode 100644 index 00000000..b5065253 --- /dev/null +++ b/.codespell/.codespellrc @@ -0,0 +1,5 @@ +[codespell] +skip = .git,node_modules,yarn.lock,Cargo.lock +count = +quiet-level = 3 +ignore-words = ./.codespell/wordlist.txt \ No newline at end of file diff --git a/.codespell/requirements.txt b/.codespell/requirements.txt new file mode 100644 index 00000000..571daf3b --- /dev/null +++ b/.codespell/requirements.txt @@ -0,0 +1 @@ +codespell==2.2.5 \ No newline at end of file diff --git a/.codespell/wordlist.txt b/.codespell/wordlist.txt new file mode 100644 index 00000000..1a22196e --- /dev/null +++ b/.codespell/wordlist.txt @@ -0,0 +1 @@ +crate \ No newline at end of file diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..04727ffe --- /dev/null +++ b/.github/workflows/codespell.yml @@ -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 \ No newline at end of file diff --git a/internal/etl/process/subscribers.go b/internal/etl/process/subscribers.go index eadb083f..e3215800 100644 --- a/internal/etl/process/subscribers.go +++ b/internal/etl/process/subscribers.go @@ -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 } @@ -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?