From f9a797ab67a2cc3a7eb81e92c6d734d4ecf06864 Mon Sep 17 00:00:00 2001 From: ruslandoga Date: Mon, 22 Jul 2024 13:12:18 +0700 Subject: [PATCH] spellcheck ci (#189) * add spellcheckers * add spellcheckers --- .codespellignore | 2 ++ .github/workflows/spellcheck.yml | 22 ++++++++++++++++++++++ .typos.toml | 3 +++ lib/ch.ex | 2 +- test/ch/faults_test.exs | 4 ++-- 5 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .codespellignore create mode 100644 .github/workflows/spellcheck.yml create mode 100644 .typos.toml diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 0000000..7ece9f2 --- /dev/null +++ b/.codespellignore @@ -0,0 +1,2 @@ +som +ECT diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 0000000..ff0ab78 --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,22 @@ +name: spellcheck + +on: + pull_request: + push: + branches: [master] + +jobs: + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: codespell-project/actions-codespell@v2 + with: + check_filenames: true + ignore_words_file: .codespellignore + + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@master diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..c98a52a --- /dev/null +++ b/.typos.toml @@ -0,0 +1,3 @@ +[default.extend-words] +"som" = "som" # ./test/ch/ecto_type_test.exs +"ECT" = "ECT" # ./test/ch/query_test.exs diff --git a/lib/ch.ex b/lib/ch.ex index 2e71c59..0a2b557 100644 --- a/lib/ch.ex +++ b/lib/ch.ex @@ -24,7 +24,7 @@ defmodule Ch do * `:scheme` - HTTP scheme, defaults to `"http"` * `:hostname` - server hostname, defaults to `"localhost"` - * `:port` - HTTP port, defualts to `8123` + * `:port` - HTTP port, defaults to `8123` * `:transport_opts` - options to be given to the transport being used. See `Mint.HTTP1.connect/4` for more info * `:database` - Database, defaults to `"default"` * `:username` - Username diff --git a/test/ch/faults_test.exs b/test/ch/faults_test.exs index e647364..3efd477 100644 --- a/test/ch/faults_test.exs +++ b/test/ch/faults_test.exs @@ -227,7 +227,7 @@ defmodule Ch.FaultsTest do :ok = :gen_tcp.send(clickhouse, intercept_packets(mint)) :ok = :gen_tcp.send(mint, intercept_packets(clickhouse)) - # falied ping + # failed ping :ok = :gen_tcp.send(clickhouse, intercept_packets(mint)) :ok = :gen_tcp.send(mint, first_byte(intercept_packets(clickhouse))) :ok = :gen_tcp.close(mint) @@ -342,7 +342,7 @@ defmodule Ch.FaultsTest do # TODO non-chunked request - test "reconects after closed before streaming request", ctx do + test "reconnects after closed before streaming request", ctx do %{port: port, listen: listen, clickhouse: clickhouse} = ctx test = self()