diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..de6362ee2 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,7 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git,*.svg,go.sum,*.lock,*.css,.codespellrc +check-hidden = true +# ignore-regex = +# short variables close to typos are often used +ignore-words-list = ot diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 000000000..7c9eafb17 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,23 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +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 diff --git a/docs/source/contrib.rst b/docs/source/contrib.rst index 8763319cb..879e6eb53 100644 --- a/docs/source/contrib.rst +++ b/docs/source/contrib.rst @@ -57,7 +57,7 @@ Code Structure - ``internal``: Contains the internal code for the project. - ``web``: Contains the backend code for the Web UI. - - ``agent``: Contains the code for runnning the workflows. + - ``agent``: Contains the code for running the workflows. - ``config``: Contains the code for loading the configuration. - ``controller``: Contains the code for managing the workflows. - ``dag``: Contains the code for parsing the workflow definition. diff --git a/docs/source/executors.rst b/docs/source/executors.rst index d934e7788..7ee5dcd14 100644 --- a/docs/source/executors.rst +++ b/docs/source/executors.rst @@ -69,7 +69,7 @@ Running Containers on the Host's Docker Environment If you are running `dagu` using a container, you need the setup below. -1. Run a `socat` conainer with the command below. +1. Run a `socat` container with the command below. .. code-block:: sh diff --git a/docs/source/yaml_format.rst b/docs/source/yaml_format.rst index f4dcd77c5..9787f886f 100644 --- a/docs/source/yaml_format.rst +++ b/docs/source/yaml_format.rst @@ -321,7 +321,7 @@ Example: dir: ${HOME}/logs command: bash stdout: /tmp/outfile - ouptut: RESULT_VARIABLE + output: RESULT_VARIABLE script: | echo "any script" signalOnStop: "SIGINT" diff --git a/internal/persistence/jsondb/database.go b/internal/persistence/jsondb/database.go index 9af4b2d39..ac48f0901 100644 --- a/internal/persistence/jsondb/database.go +++ b/internal/persistence/jsondb/database.go @@ -20,7 +20,7 @@ import ( "github.com/dagu-dev/dagu/internal/utils" ) -// Store is the interfact to store dags status in local. +// Store is the interface to store dags status in local. // It stores status in JSON format in a directory as per each dagFile. // Multiple JSON data can be stored in a single file and each data // is separated by newline. diff --git a/internal/utils/utils_test.go b/internal/utils/utils_test.go index fe464a498..cfa17e5f7 100644 --- a/internal/utils/utils_test.go +++ b/internal/utils/utils_test.go @@ -36,10 +36,10 @@ func TestMustGetwd(t *testing.T) { func TestFormatTime(t *testing.T) { tm := time.Date(2022, 2, 1, 2, 2, 2, 0, time.Now().Location()) - fomatted := utils.FormatTime(tm) - require.Equal(t, "2022-02-01 02:02:02", fomatted) + formatted := utils.FormatTime(tm) + require.Equal(t, "2022-02-01 02:02:02", formatted) - parsed, err := utils.ParseTime(fomatted) + parsed, err := utils.ParseTime(formatted) require.NoError(t, err) require.Equal(t, tm, parsed)